Page 1 of 1

Map MIDI keyboard to certain frequencies

Posted: Mon Mar 30, 2015 5:08 pm
by toni_aguirre
I was wondering, would it be possible to map the midi keyboard to an osc but for different frecuencies than usual?
For example, mapping C1 for a sine playing at 40 Hz (instead of the usual 32,7 Hz), a D1 for 71 Hz and so on. I don't want to transpose the notes (I mean, for example 5 Hz above the usual scale frecuencies) but define it completely different. I don t know much about programming in Flowstone, I just managed to build a tone generator and set manually to the desired frecuencies, but they can't be played with the keyboard

Re: Map MIDI keyboard to certain frequencies

Posted: Mon Mar 30, 2015 7:15 pm
by KG_is_back
What you can do, you can define a midi-map...an float array, where each index is note and value is the frequency for that note. Then use float array to mem prim with wave-read. midi->poly component outputs the pitch, the pitch is used as index for the midi-map, and that frequency is passed to the oscillators.

Re: Map MIDI keyboard to certain frequencies

Posted: Fri Apr 03, 2015 1:05 pm
by toni_aguirre
I managed to do the maping, but I'm having some trouble with a simple button. I tried to put a selector with a button to switch between 2 different MIDI to poly (one has portamento, I found it in the forum). Before I placed the switch, the vst runned perfectly, it produced a frequency dependent on the MIDI key, but when I connect it to the switch, even though the switch path allowes the original MIDI to poly path, it won't produce the desired frequencies any more. This switch is very simple, so I don't know why this is caused. Maybe it is because I splited the MIDI in??
EDIT: by placing a Poly Readout in the pitch output of each midi to poly, it has been aparently solved. However, gliding does not work, any idea of why?

Re: Map MIDI keyboard to certain frequencies

Posted: Fri Apr 03, 2015 5:25 pm
by KG_is_back
It's clearly a bug of the selector. It seems you cannot switch between two different midi-to-poly modules.

Also another thing - the schematic will not react to portamento, because wave read prim (the one that reads frequencies form the table based on pitch) has no interpolation. Search for some wave interpolation modules (I recommend linear interpolation for this task).