Csound Csound-dev Csound-tekno Search About

[Csnd] using cps file

Date2009-03-28 22:35
FromStefan Thomas
Subject[Csnd] using cps file
Dear community,
I'm proud of having made my first csound instrument, that I can use
with realtime midi.
Now I would like to tune my instrument.
I have the great scala software by Manuel Op de Coul. It has created a
cps-file for csound, but I don't know how to use it.
Do I have to copy it into the orchestra-file or into the score-file?

Date2009-03-29 05:42
FromAnthony Kozar
Subject[Csnd] Re: using cps file
I wasn't aware that Csound could use Scala files.  Is the file maybe just a
list of frequencies for each Midi note number?  In that case, you can read
the file into a table and index the table with the note number to obtain the
frequency.  Use the GEN23 function to read the file and then use a "table"
opcode in your instrument.

http://csounds.com/manual/html/GEN23.html
http://csounds.com/manual/html/table.html


Also, I believe that blue can read Scala files and somehow correlate them to
your score.

Anthony Kozar
mailing-lists-1001 AT anthonykozar DOT net
http://anthonykozar.net/

Stefan Thomas wrote on 3/28/09 6:35 PM:

> Dear community,
> I'm proud of having made my first csound instrument, that I can use
> with realtime midi.
> Now I would like to tune my instrument.
> I have the great scala software by Manuel Op de Coul. It has created a
> cps-file for csound, but I don't know how to use it.
> Do I have to copy it into the orchestra-file or into the score-file?
> 
> 
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"


Date2009-03-29 05:54
FromSteven Yi
Subject[Csnd] Re: Re: using cps file
Just a quick note, blue can read Scala files in a number of ways:

1. As a noteProcessor, can translate blue PCH format to frequency
(i.e. 8.1 = octave 8, scale degree 1; 8.22 = octave 8, scale degree
22)

2. PianoRoll can read in Scala and create number of steps per octave
as indicated in Scala scale; outputs frequency for note

3. Tracker object can do tracking microtonally using blue PCH format
and scale definition

There's also a python class if you're going to do scripting and want
to use scala within blue.  The method I generally promote is to create
instruments that will take in either PCH or frequency for a single
pfield, using:

ipch = (p4 < 20 ) ? cpspch(p4) : p4

I promote making instrument be able to take in a raw frequency because
then they are versatile enough to work with whatever scale you may
wish to work with.  blue will take care of translating your notes from
what is in your head and how you're working with musical values and
converting it to the frequency values that csound would then be
concerned with.

Thanks!
steven

On Sat, Mar 28, 2009 at 9:42 PM, Anthony Kozar
 wrote:
> I wasn't aware that Csound could use Scala files.  Is the file maybe just a
> list of frequencies for each Midi note number?  In that case, you can read
> the file into a table and index the table with the note number to obtain the
> frequency.  Use the GEN23 function to read the file and then use a "table"
> opcode in your instrument.
>
> http://csounds.com/manual/html/GEN23.html
> http://csounds.com/manual/html/table.html
>
>
> Also, I believe that blue can read Scala files and somehow correlate them to
> your score.
>
> Anthony Kozar
> mailing-lists-1001 AT anthonykozar DOT net
> http://anthonykozar.net/
>
> Stefan Thomas wrote on 3/28/09 6:35 PM:
>
>> Dear community,
>> I'm proud of having made my first csound instrument, that I can use
>> with realtime midi.
>> Now I would like to tune my instrument.
>> I have the great scala software by Manuel Op de Coul. It has created a
>> cps-file for csound, but I don't know how to use it.
>> Do I have to copy it into the orchestra-file or into the score-file?
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>


Date2009-03-29 11:40
FromStefan Thomas
Subject[Csnd] Re: Re: Re: using cps file
Attachments10tet.cps  schieforgelmidi01.orc  
Dear all,
thanksf for Your help, but I'm still having problems.
First I tried to install blue, but I got the following error messages
that I don't understand.
sh blue.sh
Exception in thread "main" java.lang.NoClassDefFoundError: blue/Blue
Caused by: java.lang.ClassNotFoundException: blue.Blue
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: blue.Blue.  Program will exit.
I then tried to put directly the cps-file in csound files. In the
score file I didn't get errors, but I dont understand, where exactly I
have to put in the file in the orchestra. At tghe very end? At the
beginning?
Maybee it could help that I have attached the file that scala has
produced, as well as the orchestra and sore file.

2009/3/29 Steven Yi :
> Just a quick note, blue can read Scala files in a number of ways:
>
> 1. As a noteProcessor, can translate blue PCH format to frequency
> (i.e. 8.1 = octave 8, scale degree 1; 8.22 = octave 8, scale degree
> 22)
>
> 2. PianoRoll can read in Scala and create number of steps per octave
> as indicated in Scala scale; outputs frequency for note
>
> 3. Tracker object can do tracking microtonally using blue PCH format
> and scale definition
>
> There's also a python class if you're going to do scripting and want
> to use scala within blue.  The method I generally promote is to create
> instruments that will take in either PCH or frequency for a single
> pfield, using:
>
> ipch = (p4 < 20 ) ? cpspch(p4) : p4
>
> I promote making instrument be able to take in a raw frequency because
> then they are versatile enough to work with whatever scale you may
> wish to work with.  blue will take care of translating your notes from
> what is in your head and how you're working with musical values and
> converting it to the frequency values that csound would then be
> concerned with.
>
> Thanks!
> steven
>
> On Sat, Mar 28, 2009 at 9:42 PM, Anthony Kozar
>  wrote:
>> I wasn't aware that Csound could use Scala files.  Is the file maybe just a
>> list of frequencies for each Midi note number?  In that case, you can read
>> the file into a table and index the table with the note number to obtain the
>> frequency.  Use the GEN23 function to read the file and then use a "table"
>> opcode in your instrument.
>>
>> http://csounds.com/manual/html/GEN23.html
>> http://csounds.com/manual/html/table.html
>>
>>
>> Also, I believe that blue can read Scala files and somehow correlate them to
>> your score.
>>
>> Anthony Kozar
>> mailing-lists-1001 AT anthonykozar DOT net
>> http://anthonykozar.net/
>>
>> Stefan Thomas wrote on 3/28/09 6:35 PM:
>>
>>> Dear community,
>>> I'm proud of having made my first csound instrument, that I can use
>>> with realtime midi.
>>> Now I would like to tune my instrument.
>>> I have the great scala software by Manuel Op de Coul. It has created a
>>> cps-file for csound, but I don't know how to use it.
>>> Do I have to copy it into the orchestra-file or into the score-file?
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-03-29 12:55
Frompeiman khosravi
Subject[Csnd] Re: Re: Re: Re: using cps file
did you install blue manually? what operating system are you on?
You can also join the blue mailing list.

Best
Peiman

2009/3/29 Stefan Thomas :
> Dear all,
> thanksf for Your help, but I'm still having problems.
> First I tried to install blue, but I got the following error messages
> that I don't understand.
> sh blue.sh
> Exception in thread "main" java.lang.NoClassDefFoundError: blue/Blue
> Caused by: java.lang.ClassNotFoundException: blue.Blue
>        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
> Could not find the main class: blue.Blue.  Program will exit.
> I then tried to put directly the cps-file in csound files. In the
> score file I didn't get errors, but I dont understand, where exactly I
> have to put in the file in the orchestra. At tghe very end? At the
> beginning?
> Maybee it could help that I have attached the file that scala has
> produced, as well as the orchestra and sore file.
>
> 2009/3/29 Steven Yi :
>> Just a quick note, blue can read Scala files in a number of ways:
>>
>> 1. As a noteProcessor, can translate blue PCH format to frequency
>> (i.e. 8.1 = octave 8, scale degree 1; 8.22 = octave 8, scale degree
>> 22)
>>
>> 2. PianoRoll can read in Scala and create number of steps per octave
>> as indicated in Scala scale; outputs frequency for note
>>
>> 3. Tracker object can do tracking microtonally using blue PCH format
>> and scale definition
>>
>> There's also a python class if you're going to do scripting and want
>> to use scala within blue.  The method I generally promote is to create
>> instruments that will take in either PCH or frequency for a single
>> pfield, using:
>>
>> ipch = (p4 < 20 ) ? cpspch(p4) : p4
>>
>> I promote making instrument be able to take in a raw frequency because
>> then they are versatile enough to work with whatever scale you may
>> wish to work with.  blue will take care of translating your notes from
>> what is in your head and how you're working with musical values and
>> converting it to the frequency values that csound would then be
>> concerned with.
>>
>> Thanks!
>> steven
>>
>> On Sat, Mar 28, 2009 at 9:42 PM, Anthony Kozar
>>  wrote:
>>> I wasn't aware that Csound could use Scala files.  Is the file maybe just a
>>> list of frequencies for each Midi note number?  In that case, you can read
>>> the file into a table and index the table with the note number to obtain the
>>> frequency.  Use the GEN23 function to read the file and then use a "table"
>>> opcode in your instrument.
>>>
>>> http://csounds.com/manual/html/GEN23.html
>>> http://csounds.com/manual/html/table.html
>>>
>>>
>>> Also, I believe that blue can read Scala files and somehow correlate them to
>>> your score.
>>>
>>> Anthony Kozar
>>> mailing-lists-1001 AT anthonykozar DOT net
>>> http://anthonykozar.net/
>>>
>>> Stefan Thomas wrote on 3/28/09 6:35 PM:
>>>
>>>> Dear community,
>>>> I'm proud of having made my first csound instrument, that I can use
>>>> with realtime midi.
>>>> Now I would like to tune my instrument.
>>>> I have the great scala software by Manuel Op de Coul. It has created a
>>>> cps-file for csound, but I don't know how to use it.
>>>> Do I have to copy it into the orchestra-file or into the score-file?
>>>>
>>>>
>>>> Send bugs reports to this list.
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>> csound"
>>>
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2009-03-29 14:05
FromStefan Thomas
Subject[Csnd] Re: Re: Re: Re: Re: using cps file
Dear Peiman,
Yes, I tried to install it manually. I'm using Kubuntu Linux as OS.
It's a good idea to join the blue mailing list.
I will do so!

2009/3/29 peiman khosravi :
> did you install blue manually? what operating system are you on?
> You can also join the blue mailing list.
>
> Best
> Peiman
>
> 2009/3/29 Stefan Thomas :
>> Dear all,
>> thanksf for Your help, but I'm still having problems.
>> First I tried to install blue, but I got the following error messages
>> that I don't understand.
>> sh blue.sh
>> Exception in thread "main" java.lang.NoClassDefFoundError: blue/Blue
>> Caused by: java.lang.ClassNotFoundException: blue.Blue
>>        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>>        at java.security.AccessController.doPrivileged(Native Method)
>>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
>> Could not find the main class: blue.Blue.  Program will exit.
>> I then tried to put directly the cps-file in csound files. In the
>> score file I didn't get errors, but I dont understand, where exactly I
>> have to put in the file in the orchestra. At tghe very end? At the
>> beginning?
>> Maybee it could help that I have attached the file that scala has
>> produced, as well as the orchestra and sore file.
>>
>> 2009/3/29 Steven Yi :
>>> Just a quick note, blue can read Scala files in a number of ways:
>>>
>>> 1. As a noteProcessor, can translate blue PCH format to frequency
>>> (i.e. 8.1 = octave 8, scale degree 1; 8.22 = octave 8, scale degree
>>> 22)
>>>
>>> 2. PianoRoll can read in Scala and create number of steps per octave
>>> as indicated in Scala scale; outputs frequency for note
>>>
>>> 3. Tracker object can do tracking microtonally using blue PCH format
>>> and scale definition
>>>
>>> There's also a python class if you're going to do scripting and want
>>> to use scala within blue.  The method I generally promote is to create
>>> instruments that will take in either PCH or frequency for a single
>>> pfield, using:
>>>
>>> ipch = (p4 < 20 ) ? cpspch(p4) : p4
>>>
>>> I promote making instrument be able to take in a raw frequency because
>>> then they are versatile enough to work with whatever scale you may
>>> wish to work with.  blue will take care of translating your notes from
>>> what is in your head and how you're working with musical values and
>>> converting it to the frequency values that csound would then be
>>> concerned with.
>>>
>>> Thanks!
>>> steven
>>>
>>> On Sat, Mar 28, 2009 at 9:42 PM, Anthony Kozar
>>>  wrote:
>>>> I wasn't aware that Csound could use Scala files.  Is the file maybe just a
>>>> list of frequencies for each Midi note number?  In that case, you can read
>>>> the file into a table and index the table with the note number to obtain the
>>>> frequency.  Use the GEN23 function to read the file and then use a "table"
>>>> opcode in your instrument.
>>>>
>>>> http://csounds.com/manual/html/GEN23.html
>>>> http://csounds.com/manual/html/table.html
>>>>
>>>>
>>>> Also, I believe that blue can read Scala files and somehow correlate them to
>>>> your score.
>>>>
>>>> Anthony Kozar
>>>> mailing-lists-1001 AT anthonykozar DOT net
>>>> http://anthonykozar.net/
>>>>
>>>> Stefan Thomas wrote on 3/28/09 6:35 PM:
>>>>
>>>>> Dear community,
>>>>> I'm proud of having made my first csound instrument, that I can use
>>>>> with realtime midi.
>>>>> Now I would like to tune my instrument.
>>>>> I have the great scala software by Manuel Op de Coul. It has created a
>>>>> cps-file for csound, but I don't know how to use it.
>>>>> Do I have to copy it into the orchestra-file or into the score-file?
>>>>>
>>>>>
>>>>> Send bugs reports to this list.
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>>> csound"
>>>>
>>>>
>>>>
>>>> Send bugs reports to this list.
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>>>
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2009-03-30 01:04
FromAnthony Kozar
Subject[Csnd] Re: using cps file
Putting the cps file directly into the orchestra is not possible and putting
it into the score file probably does not make sense.  I've looked at your
file 10tet.cps and see that it contains two columns of data: midi note
number and frequency.  It would be easier to use without the first column,
but I think it is still usable.

You need to insert an f statement in the score that uses GEN23 to read the
cps file into a table:

f 10  0 256 -23 "10tet.cps"    ; the number 10 in f 10 is arbitrary

Then you need to replace this line in your orchestra

  icps    cpsmidi

with something similar to this:
  
  ituningtable = 10         ; the number of the f-table

  imnn    notnum
  indx    =  imnn * 2 + 1   ; values in table alternate between
                            ; Midi note nums and frequencies
  icps    table  indx, ituningtable

It is necessary to multiply the Midi note number by 2 since only every other
value in the table is a frequency and then add 1 so that note number 0 is
mapped to index 1 in the table.  If you were to edit out the first column of
numbers in 10tet.cps, then you could just use indx = imnn.

I don't have a Midi interface with which to check that this code works, but
I tried it with a Midi file and got some 10 TET Bach ^_^, so I think you'll
be OK. 

Anthony Kozar
mailing-lists-1001 AT anthonykozar DOT net
http://anthonykozar.net/

Stefan Thomas wrote on 3/29/09 6:40 AM:

> I then tried to put directly the cps-file in csound files. In the
> score file I didn't get errors, but I dont understand, where exactly I
> have to put in the file in the orchestra. At tghe very end? At the
> beginning?
> Maybee it could help that I have attached the file that scala has
> produced, as well as the orchestra and sore file.


Date2009-03-30 06:39
FromStefan Thomas
Subject[Csnd] Re: Re: using cps file
Dear Anthony,
many thanks! I didn't try it yet, but I will do it ass soon as possible.

2009/3/30 Anthony Kozar :
> Putting the cps file directly into the orchestra is not possible and putting
> it into the score file probably does not make sense.  I've looked at your
> file 10tet.cps and see that it contains two columns of data: midi note
> number and frequency.  It would be easier to use without the first column,
> but I think it is still usable.
>
> You need to insert an f statement in the score that uses GEN23 to read the
> cps file into a table:
>
> f 10  0 256 -23 "10tet.cps"    ; the number 10 in f 10 is arbitrary
>
> Then you need to replace this line in your orchestra
>
>  icps    cpsmidi
>
> with something similar to this:
>
>  ituningtable = 10         ; the number of the f-table
>
>  imnn    notnum
>  indx    =  imnn * 2 + 1   ; values in table alternate between
>                            ; Midi note nums and frequencies
>  icps    table  indx, ituningtable
>
> It is necessary to multiply the Midi note number by 2 since only every other
> value in the table is a frequency and then add 1 so that note number 0 is
> mapped to index 1 in the table.  If you were to edit out the first column of
> numbers in 10tet.cps, then you could just use indx = imnn.
>
> I don't have a Midi interface with which to check that this code works, but
> I tried it with a Midi file and got some 10 TET Bach ^_^, so I think you'll
> be OK.
>
> Anthony Kozar
> mailing-lists-1001 AT anthonykozar DOT net
> http://anthonykozar.net/
>
> Stefan Thomas wrote on 3/29/09 6:40 AM:
>
>> I then tried to put directly the cps-file in csound files. In the
>> score file I didn't get errors, but I dont understand, where exactly I
>> have to put in the file in the orchestra. At tghe very end? At the
>> beginning?
>> Maybee it could help that I have attached the file that scala has
>> produced, as well as the orchestra and sore file.
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>


Date2009-03-31 07:20
FromStefan Thomas
Subject[Csnd] Re: Re: using cps file
Dear Anthony,
it worked like I wanted it.
Thanks again.

2009/3/30 Stefan Thomas :
> Dear Anthony,
> many thanks! I didn't try it yet, but I will do it ass soon as possible.
>
> 2009/3/30 Anthony Kozar :
>> Putting the cps file directly into the orchestra is not possible and putting
>> it into the score file probably does not make sense.  I've looked at your
>> file 10tet.cps and see that it contains two columns of data: midi note
>> number and frequency.  It would be easier to use without the first column,
>> but I think it is still usable.
>>
>> You need to insert an f statement in the score that uses GEN23 to read the
>> cps file into a table:
>>
>> f 10  0 256 -23 "10tet.cps"    ; the number 10 in f 10 is arbitrary
>>
>> Then you need to replace this line in your orchestra
>>
>>  icps    cpsmidi
>>
>> with something similar to this:
>>
>>  ituningtable = 10         ; the number of the f-table
>>
>>  imnn    notnum
>>  indx    =  imnn * 2 + 1   ; values in table alternate between
>>                            ; Midi note nums and frequencies
>>  icps    table  indx, ituningtable
>>
>> It is necessary to multiply the Midi note number by 2 since only every other
>> value in the table is a frequency and then add 1 so that note number 0 is
>> mapped to index 1 in the table.  If you were to edit out the first column of
>> numbers in 10tet.cps, then you could just use indx = imnn.
>>
>> I don't have a Midi interface with which to check that this code works, but
>> I tried it with a Midi file and got some 10 TET Bach ^_^, so I think you'll
>> be OK.
>>
>> Anthony Kozar
>> mailing-lists-1001 AT anthonykozar DOT net
>> http://anthonykozar.net/
>>
>> Stefan Thomas wrote on 3/29/09 6:40 AM:
>>
>>> I then tried to put directly the cps-file in csound files. In the
>>> score file I didn't get errors, but I dont understand, where exactly I
>>> have to put in the file in the orchestra. At tghe very end? At the
>>> beginning?
>>> Maybee it could help that I have attached the file that scala has
>>> produced, as well as the orchestra and sore file.
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>
>


Date2009-03-31 09:20
FromRory Walsh
Subject[Csnd] Re: Re: Re: using cps file
It would be nice to include this information in the manual somewhere.
I'm not sure where you would go however.

2009/3/31 Stefan Thomas :
> Dear Anthony,
> it worked like I wanted it.
> Thanks again.