Csound Csound-dev Csound-tekno Search About

[Csnd] Creating a musical instrument (theremin) using Csound host api

Date2013-08-04 20:39
Fromgerman bobr
Subject[Csnd] Creating a musical instrument (theremin) using Csound host api
Hi,
I'm new to csound and i am programming some sort of theremin instrument using C++ and csound host api.
I want to use Csound's power to create the audio for the instrument, using basic or FM oscilators.

Is csound suitable for this?

I followed some tutorials to write an application that can read a .csd file and play it, also i can send score events and control some variables using Channel I/O, but i cant find how to:

a- Create a constant note and vary pitch or amp over time. (tried -1 duration, but it doesn't work)
b- Play a note whenever there is an event in my app... (i Statement requires an starting time and an ending time, i don't know when notes are going to start or when they are going to stop, i need something like "i 1 <now> <until i say stop>"

Any help will be greatly appreciated!

Thanks
Germán



Date2013-08-04 21:40
FromMichael Gogins
SubjectRe: [Csnd] Creating a musical instrument (theremin) using Csound host api
a You can use the alwayson opcode to schedule an instrument to stay on indefinitely. Then you can use control channels to send pitch or amp changes to the instrument.

b You can schedule an event at any time with csoundInputMessage or csoundScoreEvent. In these cases the time is relative to the time of the call, so usually the time of an event is just zero.

Hope this helps,
Mike


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sun, Aug 4, 2013 at 3:39 PM, german bobr <german@germanbobr.com.ar> wrote:
Hi,
I'm new to csound and i am programming some sort of theremin instrument using C++ and csound host api.
I want to use Csound's power to create the audio for the instrument, using basic or FM oscilators.

Is csound suitable for this?

I followed some tutorials to write an application that can read a .csd file and play it, also i can send score events and control some variables using Channel I/O, but i cant find how to:

a- Create a constant note and vary pitch or amp over time. (tried -1 duration, but it doesn't work)
b- Play a note whenever there is an event in my app... (i Statement requires an starting time and an ending time, i don't know when notes are going to start or when they are going to stop, i need something like "i 1 <now> <until i say stop>"

Any help will be greatly appreciated!

Thanks
Germán