# teletype 4.0.0: beta 2

Well you should be seeing
::quick math::
0.003 volts on CV 1

CV output range is 0-10 volts, which maps to 0-16383.

2 Likes

OOOOOOkaaayyyyy

So where I read you could drop the `V` was when the doc was mentioning the command `CV 1 V 0`, which for 0, you could because 0=0. I guess I overcomplicated that and assumed the `V` could be dropped for any voltage lookup! That makes sense. Thanks for clarifying because it wasnāt obvious to me about how that only works with 0. LOL

5 Likes

(Edit: you can do this directly within Teletype, if that suits you: teletype 4.0.0: beta 2 [new june 20] ready for testing! - #71 by xenus_dad)

I donāt know if this will be useful to anyone, but, I wanted it so I made it: Midi notes to bitmask to base 10

Youāll need to be at a computer with a MIDI keyboard connected, and using a browser which supports Web MIDI API (Chrome, Edge, Opera).

I was playing with the binary scale ops, `N.BX` and the like, and I wanted to start storing scales in patterns, which means using base 10 numbers. If you already know what āscalesā you want, you can look up the base 10 representation on Teletype, i.e. if you want a natural minor scale you can feed the reverse binary to Teletype and have it give you the appropriate base 10 number:

``````(live mode)
> R101101011010
1453
``````

Which is great! But if you donāt necessarily know what scales/chords you want to be playing with, or you want to improvise at a keyboard to find them (like me), then the process of finding a chord, then figuring out which pitches youāre playing, then converting that to a reverse bitmask, then getting that converted to base 10 is a little unintuitive.

My tiny little web thing will take notes from a connected MIDI keyboard, figure out what pitches youāre using, and give you the base 10 number which you can then feed to Teletype, or more likely, store in patterns and access later to feed to the binary scale ops.

For example, if you play a C major chord, the base 10 bitmask should show ā145ā. You could then do something like this in Teletype:

``````  N.BX 0 0 145;
JF.NOTE N.BX 0 RND 7 V 5;
``````

This would assign the C major chord āscaleā to scale index 0, and then play a random note in the chord over two octaves on Just Friends.

Itās really quick and dirty, it might break on you, maybe no one really needs this? But I wanted it so I thought Iād share. I might improve it, I might not If there was already a better way of doing this, Iād love to know.

5 Likes

Great!

Apparently firefox does not support web midi, but you knew that.

āscale index 1ā I think you meant āscale index 0ā

As an additional approach to your solution, I wondered if it would be possible to do this all on teletype by monitoring a pitch CV going into the IN jack:

``````X BSET X % IN 12
``````

Start off with `X` set to 0, and trigger this script to add the note thatās playing into the IN jack to the bit mask stored in `X`. Youāll need to set up the IN jack scaling so that it outputs as semitones rather than the default full range: `IN.SCALE 0 120` (I think, or should it be `IN.SCALE 0 119`? I donāt have my rack with me at the moment to checkā¦)

Sorry I canāt actually test this at the moment, but hopefully itāll work.

Edit: fixed a wee bug with updating X!

1 Like

could also just plug a midi keyboard into teletype itself (make sure your case has enough power or power your keyboard externally), and use this script:

``````#I
MI.\$ 1 SCRIPT 1
MI.\$ 2 SCRIPT 3
A 0
C 0

#1
L 1 MI.NL: SCRIPT 2

#2
A BSET A % MI.N 12
PRINT 1 A
PRINT 2 A

#3
C - C MI.OL
IF EZ C: A 0
``````

put this into the scene description:

``````DECIMAL VALUE: %1
VALUE FOR N.B: %R2
``````

switch to live screen, plug your midi keyboard in and press keys - the live screen will show both the decimal and the reversed binary values (havenāt tested it but should work).

5 Likes

Itās nice to be able to hear the pattern as you play it on the keyboard, but that could be set up here really easily, along with a simple script to insert the value to a pattern to capture it. Will give a shot later.

Edit: Iām not sure Iād call it āValue for N.Bāā¦ You can certainly feed those ops reverse binary format, but itās not required to use numbers in that format, right? and they take up many more characters. Positive, theyāre more human readable for sure; negative, the char length, not storable in patterns (to my knowledge), etc

yeah, itās not required to use any specific number format, under the hood itās just numbers

That was pretty good for not being at your Teletype This is what ended up working for meā¦just needed some adjustment.

I might continue to use my web one since I have a MIDI keyboard hooked up to my computer all the time, and swapping back and forth between the typing keyboard and MIDI keyboard going into Teletype USB was a little cumbersome. (Oh, for multiple devices at once into Teletype!)

Still, itās good to know this is possible. It would be really easy to take this and turn it into an arpeggiator playable from MIDI.

Thank you for the pointers, and all your hard work on Teletype!

``````MIDI 2 DECIMAL/RBINARY

DECIMAL: %1
RBINARY: R%R2

#1
L 1 MI.NL: \$ 2

#2
A BSET A % MI.N 12
PRINT 1 A
PRINT 2 A

#3
L 1 MI.OL: \$ 4

#4
A BCLR A % MI.O 12
PRINT 1 A
PRINT 2 A

#I
MI.\$ 1 1
MI.\$ 2 3
A 0
``````

This ended up being more or less the core of the solution. Thanks to you both I understand `BSET` and `BCLR`, which I didnāt before. I think I trust MIDI more than CV for this sort of thing though.

4 Likes

last call for bug reports!

i believe everything has been addressed but if you reported a bug here and i missed it - please post again or DM me the details

Not a bug, but does V3 Crowās ASL require revisiting Crow OPs? Havenāt had time to look into this, but since itās last call and allā¦

@scanner_darkly I notice an issue that is still present but maybe itās in the designā¦
Sometimes the screen go off.
Itās happen really not a lot so itās difficult for me to find from what it come, I am not sure if it come from the screensaverā¦
But the TT is always responsive and I can make a Ā« blind Ā» save before power cyclingā¦

There is a screensaver that turns the display off after a certain amount of time, but hitting keys on the keyboard should wake it up again.

1 Like

Yes my screensaver wake up after pressing a key, but sometimes, really not often, the screen not wake up when I push a key.
But as I said it happen not often and I donāt know if itās come from after a screensaver wake upā¦
I am still on the beta 4.0 79DB601

when you say itās responsive, how do you know it is? does it keep outputting CV/triggers, just the screen is blank?

anybody else experienced a similar issue?

Yes itās responsive because teletype is always playing CV/Trig, just the screen is blank.
The keyboard is responsive too, because I am able to do alt+echap and alt+enter for saving my script.

• how do you know that it actually saved the scene?
• did you experience this issue before 4.0.0 beta?
• are you able to reproduce it reliably?

I know it actually save the scene because when itās happened I do alt+echap, then alt+enter and it save my changes.
(I do it with blank screen)

Yes I remember to have this issue before, It seem me with the last official and also for sure with the beta before this beta (the firmware with Disting ex ops)

Sorry but no, the issue seems happen randomly and rarely. Itās not happen with a special configurations or something specific that I changeā¦

do you remember by any chance what was the last screen shown before it happened?

Unfortunately I donāt really remember. I will pay attention to the last screen shown when it will happen again.
I can manage with this issue so itās not annoying a lotā¦