[Cs-dev] Real time events and timestamps
Date | 2014-07-29 21:15 |
From | "Yogi A. Patel" |
Subject | [Cs-dev] Real time events and timestamps |
Attachments | None None |
Hi - I have a few questions about real-time performance. I have csound fully working on the beaglebone black with angstrom (posting instructions soon since it was nontrivial). I have the .csd file generating tones at the frequency and amplitude that I want and have a few questions: 1. I want to make sure that this tone generation is precise (tones are occurring every 500 ms). Is there a way to get a precise time reading for when each tone is generated? 2. I have a train of tones (call it tone1) being generated for 20 seconds at a rate of 0.5 hz. I want to generate a random tone (call it tone2) of a different frequency during the window of 10-18s within that 20s period tone1 is still playing. Is it possible to do this? I can’t seem to find any opcode that could do this? 3. I want to use a GPIO pin on the beaglebone to detect when two buttons are pressed - each in response to one of the two tones described above. What is the best way to do this using csound? Is it more precise (in terms of timing) to call csound with the .csd file from c or use the C API to generate these tones and control the buttons? Thank you! Yogi |
Date | 2014-08-01 15:33 |
From | Oeyvind Brandtsegg |
Subject | Re: [Cs-dev] Real time events and timestamps |
Maybe this is all too late, and you've figured it out already, but a starting point for your setup might be something like this. You would reinit instr 1 for each tone pair event. This can also be done automatically within instr 1, just say if it matches what you need and if you need more help with it. Also, this is perhaps more suited for the normal csound list, as it is a problem other users/programmers might be interested in. The dev list is more focused on issues related to development of the Csound language/library/core (programming of Csound) while the normal list is more for the use of the language (programming in Csound). all best Oeyvind |