[Csnd] loscil doesn't work
| Date | 2010-05-03 08:46 |
| From | Stefan Thomas |
| Subject | [Csnd] loscil doesn't work |
| Dear community, I tried to do one of the exercises from the csound-book, chapter one: Make three copies of f 4 and renumber them f 5, f 6 and f 7. Load in your own samples (As a sample-source I used the file hello.wavyoursound1.aif,yoursound2.aif,yoursound3.aif). Create multiple copies of instr 106 and number them instr 66, instr 67 and instr 68. Edit the instruments so that they eachreada different soundfile at a different pitch. Play the different samples simultaneously. When I run csound -odac -d simplesample.orc simplesample.wav I get the error message: ACHTUNG: [mhello.wav sr = 22050, orch sr = 44100.0[mI can't hear any sound after running the file. I can't find my mistake. Here are the orchestra and score-file: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; simplesample.orc ;;;;;;;;;;;;;;;; sr = 44100 kr = 4410 ksmps = 10 nchnls = 1 instr 106 iamplitude = p4 ipitch = p5 a1 loscil iamplitude, ipitch, 4, 1 ; sample-based looping oscillator out a1 endin ;;;;;;;;;;;;;;;;;;;;;;;;;;; simplesample.sco ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,, ; Function 4 uses the GEN01 subroutine to read in an audio file f 4 0 0 1 "hello.wav" 0 4 0 ;inst start duration amplitude pitch i 106 0 2.3 10000 440 i 106 3 2.3 10000 440 |
| Date | 2010-05-03 15:50 |
| From | |
| Subject | [Csnd] Re: loscil doesn't work |
hi -
the line
a1 loscil iamplitude, ipitch, 4, 1
plays the sample at ipitch=440 with a speed (and pitch) 440 times as high
as the original speed (pitch).
you must use ipitch=1 and related values.
i'm not sure whether it's a problem that the sr of the sample differs from
the sr of the orchestra.
best -
joachim
On Mon, 3 May 2010 09:46:31 +0200, Stefan Thomas
|