Hi folks,
I'm far from new to software but I am new to VM Designer.
1. Is there a decent programmer's reference guide somewhere? I've gleaned some stuff from the "Manual" on CA's website, from the example projects, from the list of library functions in the IDE and from this forum but it's slow going because I have to experiment to learn how stuff works, stuff that must be documented somewhere. Two recent examples are how to process Poly CV signals and how to send MIDI messages.
2. Is there a way to send text/values to the Output window in the debugger? Trace() or console.log() type stuff.
Two Rookie questions
- honki-bobo
- Posts: 310
- Joined: Sat Nov 09, 2019 1:18 pm
Re: Two Rookie questions
Hi boingy,
log in to your CA account and go to your library at https://store.cherryaudio.com/my/settin ... ge+Modular
Download and extract the VM Designer Development kit. Inside is a folder called "Documentation" where you will find a programmer's guide PDF and the JavaDoc API documentation (open the "index.html" and go from there).
For polyphonic signals you simply process each voice sequencially and use the GetPolyVaue(int polyChannel) and SetPolyValue(int polyChannel, double value) methods of the PolyJacks.
For example, instead of
you would code
You can send MIDI messages by constructing a ShortMessage , setting the parameters you need according to MIDI standard and send it through the MIDI jack's AddMessage(javax.sound.midi.ShortMessage message) method.
For console output use the Log(java.lang.String logStatement) or LogError(java.lang.String logStatement) methods of the VoltagModule class.
Best regards,
Martin
log in to your CA account and go to your library at https://store.cherryaudio.com/my/settin ... ge+Modular
Download and extract the VM Designer Development kit. Inside is a folder called "Documentation" where you will find a programmer's guide PDF and the JavaDoc API documentation (open the "index.html" and go from there).
For polyphonic signals you simply process each voice sequencially and use the GetPolyVaue(int polyChannel) and SetPolyValue(int polyChannel, double value) methods of the PolyJacks.
For example, instead of
Code: Select all
double myJackValue = myAudioJack.GetValue();
// do stuff with myJackValue
myOutputJack.SetValue(myJackValue)
Code: Select all
for (int polyChannel = 0; polyChannel < this.GetNumberOfPolyVoices(); polyChannel++) {
double myJackValue = myPolyAudioJack.GetPolyValue(polyChannel);
// do stuff with myJackValue
myPolyOutputJack.SetPolyValue(polyChannel, myJackValue)
}
For console output use the Log(java.lang.String logStatement) or LogError(java.lang.String logStatement) methods of the VoltagModule class.
Best regards,
Martin
Re: Two Rookie questions
Thanks Martin. I don't know how I didn't spot the documentation in my account.
The Log() thing is a lifesaver. I've been sending debug data to text labels, which is far from ideal!
The Log() thing is a lifesaver. I've been sending debug data to text labels, which is far from ideal!
Re: Two Rookie questions
A word of warning on Log(). It works fine the vast majority of the time but I've seen some very strange behaviour on occasion. So sometimes writing to labels is a good fall back.
When doing anything dynamic, logging isn't much use anyway so one technique I use a lot is to add a temporary socket to a module and send test signals to the outside world through it. I call these sockets stomas after the medical technique.
Another thing to note is that multi-threading in VM isn't properly documented so if you do anything even remotely fancy you need to keep on your toes looking for thread safety issues.
When doing anything dynamic, logging isn't much use anyway so one technique I use a lot is to add a temporary socket to a module and send test signals to the outside world through it. I call these sockets stomas after the medical technique.
Another thing to note is that multi-threading in VM isn't properly documented so if you do anything even remotely fancy you need to keep on your toes looking for thread safety issues.
Re: Two Rookie questions
Thanks Colin, some good tips there. I'm some way from doing fancy stuff just yet. I'm still at the stage of fumbling around the class methods and cross referencing the many example files I have loaded up in a text editor on the second monitor. It won't take me long to get up to speed though, and then I can produce some proper bugs rather than rookie ones.
My core skill is real-time embedded C so I am very familiar with the quirks of minority-audience development tools. VM designer is pretty good so far but I know that tools like this make it really easy to get 95% of the way there but that the final 5% can drive you mad. Or maybe even be impossible.
So I imagine you'll be seeing a few more posts from me...
My core skill is real-time embedded C so I am very familiar with the quirks of minority-audience development tools. VM designer is pretty good so far but I know that tools like this make it really easy to get 95% of the way there but that the final 5% can drive you mad. Or maybe even be impossible.
So I imagine you'll be seeing a few more posts from me...