Csound Csound-dev Csound-tekno Search About

[Csnd] 2 Midi Files in one project

Date2019-12-11 18:35
FromMahubis
Subject[Csnd] 2 Midi Files in one project
I'm trying to play two separate midi files in one project. Bronson2 I have
working fine. How should I approach bass.mid to get it to work alongside the
other file. I have a feeling it's something about Midi numbers however I'm
new to csound and unsure. I've posted the code below. I'm receiving an error
message that the midi file won't load however I've made sure it's in the
project file. Any help is appreciated, thanks.



-F Bronson2.mid
-F bass.mid



ksmps = 10
0dbfs = 1


  instr 1
iamp        ampmidi 1
ifr         cpsmidi

aosc oscil iamp, ifr, 1

afilt lpf18 aosc*.5, 1500, .89, .9
out afilt*.02

  endin

    instr 5
iamp        ampmidi 1
ifr         cpsmidi

aosc oscil iamp, ifr, 1

afilt lpf18 aosc*.5, 1500, .89, .9
out afilt*.02

  endin

  instr 4       ;hihat closed

aamp      expon     .25,  0.1,   .001   ;short fade out...an a-rate
exponantial line, a-rate makes it more accurate.
arand     rand      aamp                ;random noise faded
out arand*.1

endin

instr 2 ;snare
iamp = p4
aenv1   expon  iamp, 0.03, 0.01   ;short fade out
a1      oscili aenv1, 147, 1        ;'ring' faded, 147 hz works well for
snare
ring.
aamp    expon    .25,  0.2,  .001   ;short fade ut
arand   rand     aamp               ;random noise faded
out a1+arand*.2                 ;mix
endin

instr 3; kick
ipitch = p4
k1  expon    ipitch, .2, 50     ;detune...with user-controlled starting
point.
aenv expon 1, p3, 0.01      ;fade over note
a1  poscil    aenv, k1, 1     ;pitched tone, faded out
out a1*.4*.2                 ;scale down volume
endin






f 0 3600
f1 0 1024 10 1

t 0 120

{16 CNT ;38 seconds long

i4 [0   + 4*$CNT.]    0.25
i4 [0.5 + 4*$CNT.]    0.25
i4 [1   + 4*$CNT.]    0.25
i4 [1.5 + 4*$CNT.]    0.25 
i4 [2   + 4*$CNT.]    0.25
i4 [2.5 + 4*$CNT.]    0.25
i4 [3   + 4*$CNT.]    0.25 
i4 [3.5 + 4*$CNT.]    0.25

i2 [1 + 4*$CNT.] .25 .45
i2 [3 + 4*$CNT.] .25 .45

i3 [0   + 4*$CNT.] .25 100
i3 [2   + 4*$CNT.] .25 100
i3 [2.5 + 4*$CNT.] .25 100

}







--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2019-12-11 18:52
FromRory Walsh
SubjectRe: [Csnd] 2 Midi Files in one project
Others will no better, but I didn't think this was possible. I've only ever seen examples of a single MIDI file loaded, but that doesn't mean it's not possible. Others, what say ye?

On Wed, 11 Dec 2019 at 18:29, Mahubis <mark63888@gmail.com> wrote:
I'm trying to play two separate midi files in one project. Bronson2 I have
working fine. How should I approach bass.mid to get it to work alongside the
other file. I have a feeling it's something about Midi numbers however I'm
new to csound and unsure. I've posted the code below. I'm receiving an error
message that the midi file won't load however I've made sure it's in the
project file. Any help is appreciated, thanks.

<CsoundSynthesizer>
<CsOptions>
-F Bronson2.mid
-F bass.mid
</CsOptions>
<CsInstruments>

ksmps = 10
0dbfs = 1


  instr 1
iamp        ampmidi 1
ifr         cpsmidi

aosc oscil iamp, ifr, 1

afilt lpf18 aosc*.5, 1500, .89, .9
out afilt*.02

  endin

    instr 5
iamp        ampmidi 1
ifr         cpsmidi

aosc oscil iamp, ifr, 1

afilt lpf18 aosc*.5, 1500, .89, .9
out afilt*.02

  endin

  instr 4       ;hihat closed

aamp      expon     .25,  0.1,   .001   ;short fade out...an a-rate
exponantial line, a-rate makes it more accurate.
arand     rand      aamp                ;random noise faded
out arand*.1

endin

instr 2 ;snare
iamp = p4
aenv1   expon  iamp, 0.03, 0.01   ;short fade out
a1      oscili aenv1, 147, 1        ;'ring' faded, 147 hz works well for
snare
ring.
aamp    expon    .25,  0.2,  .001   ;short fade ut
arand   rand     aamp               ;random noise faded
out a1+arand*.2                 ;mix
endin

instr 3; kick
ipitch = p4
k1  expon    ipitch, .2, 50     ;detune...with user-controlled starting
point.
aenv expon 1, p3, 0.01      ;fade over note
a1  poscil    aenv, k1, 1     ;pitched tone, faded out
out a1*.4*.2                 ;scale down volume
endin




</CsInstruments>
<CsScore>
f 0 3600
f1 0 1024 10 1

t 0 120

{16 CNT ;38 seconds long

i4 [0   + 4*$CNT.]    0.25
i4 [0.5 + 4*$CNT.]    0.25
i4 [1   + 4*$CNT.]    0.25
i4 [1.5 + 4*$CNT.]    0.25
i4 [2   + 4*$CNT.]    0.25
i4 [2.5 + 4*$CNT.]    0.25
i4 [3   + 4*$CNT.]    0.25
i4 [3.5 + 4*$CNT.]    0.25

i2 [1 + 4*$CNT.] .25 .45
i2 [3 + 4*$CNT.] .25 .45

i3 [0   + 4*$CNT.] .25 100
i3 [2   + 4*$CNT.] .25 100
i3 [2.5 + 4*$CNT.] .25 100

}


</CsScore>
</CsoundSynthesizer>



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2019-12-11 19:06
FromVictor Lazzarini
SubjectRe: [Csnd] 2 Midi Files in one project
yes, you can only read one midifile per instance of Csound.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 11 Dec 2019, at 18:52, Rory Walsh <rorywalsh@ear.ie> wrote:

Others will no better, but I didn't think this was possible. I've only ever seen examples of a single MIDI file loaded, but that doesn't mean it's not possible. Others, what say ye?

On Wed, 11 Dec 2019 at 18:29, Mahubis <mark63888@gmail.com> wrote:
I'm trying to play two separate midi files in one project. Bronson2 I have
working fine. How should I approach bass.mid to get it to work alongside the
other file. I have a feeling it's something about Midi numbers however I'm
new to csound and unsure. I've posted the code below. I'm receiving an error
message that the midi file won't load however I've made sure it's in the
project file. Any help is appreciated, thanks.

<CsoundSynthesizer>
<CsOptions>
-F Bronson2.mid
-F bass.mid
</CsOptions>
<CsInstruments>

ksmps = 10
0dbfs = 1


  instr 1
iamp        ampmidi 1
ifr         cpsmidi

aosc oscil iamp, ifr, 1

afilt lpf18 aosc*.5, 1500, .89, .9
out afilt*.02

  endin

    instr 5
iamp        ampmidi 1
ifr         cpsmidi

aosc oscil iamp, ifr, 1

afilt lpf18 aosc*.5, 1500, .89, .9
out afilt*.02

  endin

  instr 4       ;hihat closed

aamp      expon     .25,  0.1,   .001   ;short fade out...an a-rate
exponantial line, a-rate makes it more accurate.
arand     rand      aamp                ;random noise faded
out arand*.1

endin

instr 2 ;snare
iamp = p4
aenv1   expon  iamp, 0.03, 0.01   ;short fade out
a1      oscili aenv1, 147, 1        ;'ring' faded, 147 hz works well for
snare
ring.
aamp    expon    .25,  0.2,  .001   ;short fade ut
arand   rand     aamp               ;random noise faded
out a1+arand*.2                 ;mix
endin

instr 3; kick
ipitch = p4
k1  expon    ipitch, .2, 50     ;detune...with user-controlled starting
point.
aenv expon 1, p3, 0.01      ;fade over note
a1  poscil    aenv, k1, 1     ;pitched tone, faded out
out a1*.4*.2                 ;scale down volume
endin




</CsInstruments>
<CsScore>
f 0 3600
f1 0 1024 10 1

t 0 120

{16 CNT ;38 seconds long

i4 [0   + 4*$CNT.]    0.25
i4 [0.5 + 4*$CNT.]    0.25
i4 [1   + 4*$CNT.]    0.25
i4 [1.5 + 4*$CNT.]    0.25
i4 [2   + 4*$CNT.]    0.25
i4 [2.5 + 4*$CNT.]    0.25
i4 [3   + 4*$CNT.]    0.25
i4 [3.5 + 4*$CNT.]    0.25

i2 [1 + 4*$CNT.] .25 .45
i2 [3 + 4*$CNT.] .25 .45

i3 [0   + 4*$CNT.] .25 100
i3 [2   + 4*$CNT.] .25 100
i3 [2.5 + 4*$CNT.] .25 100

}


</CsScore>
</CsoundSynthesizer>



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2019-12-11 19:15
Frompete.goodeve@COMPUTER.ORG
SubjectRe: [Csnd] 2 Midi Files in one project
AttachmentsNone  

Date2019-12-11 19:27
FromRory Walsh
SubjectRe: [Csnd] 2 Midi Files in one project
I'm guessing the fact that we don't already have one is indicative of it not being that straightforward? But I'm not really a MIDI guy..

On Wed, 11 Dec 2019 at 19:15, <pete.goodeve@computer.org> wrote:
On Wed, Dec 11, 2019 at 07:06:28PM +0000, Victor Lazzarini wrote:

> yes, you can only read one midifile per instance of Csound.

I guess it would be nice to have an opcode to specify a midifile to run.
Would this be hard?

Meanwhile, maybe a solution would be to use an external midifile player
to feed live MIDI to Csound.

        -- Pete --

>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
> On 11 Dec 2019, at 18:52, Rory Walsh <rorywalsh@ear.ie<mailto:rorywalsh@ear.ie>> wrote:
>
> Others will no better, but I didn't think this was possible. I've only ever seen examples of a single MIDI file loaded, but that doesn't mean it's not possible. Others, what say ye?
>
> On Wed, 11 Dec 2019 at 18:29, Mahubis <mark63888@gmail.com<mailto:mark63888@gmail.com>> wrote:
> I'm trying to play two separate midi files in one project. Bronson2 I have
> working fine. How should I approach bass.mid to get it to work alongside the
> other file. I have a feeling it's something about Midi numbers however I'm
> new to csound and unsure. I've posted the code below. I'm receiving an error
> message that the midi file won't load however I've made sure it's in the
> project file. Any help is appreciated, thanks.
>
> <CsoundSynthesizer>
> <CsOptions>
> -F Bronson2.mid
> -F bass.mid
> </CsOptions>
> <CsInstruments>
>
> ksmps = 10
> 0dbfs = 1
>
>
>   instr 1
> iamp        ampmidi 1
> ifr         cpsmidi
>
> aosc oscil iamp, ifr, 1
>
> afilt lpf18 aosc*.5, 1500, .89, .9
> out afilt*.02
>
>   endin
>
>     instr 5
> iamp        ampmidi 1
> ifr         cpsmidi
>
> aosc oscil iamp, ifr, 1
>
> afilt lpf18 aosc*.5, 1500, .89, .9
> out afilt*.02
>
>   endin
>
>   instr 4       ;hihat closed
>
> aamp      expon     .25,  0.1,   .001   ;short fade out...an a-rate
> exponantial line, a-rate makes it more accurate.
> arand     rand      aamp                ;random noise faded
> out arand*.1
>
> endin
>
> instr 2 ;snare
> iamp = p4
> aenv1   expon  iamp, 0.03, 0.01   ;short fade out
> a1      oscili aenv1, 147, 1        ;'ring' faded, 147 hz works well for
> snare
> ring.
> aamp    expon    .25,  0.2,  .001   ;short fade ut
> arand   rand     aamp               ;random noise faded
> out a1+arand*.2                 ;mix
> endin
>
> instr 3; kick
> ipitch = p4
> k1  expon    ipitch, .2, 50     ;detune...with user-controlled starting
> point.
> aenv expon 1, p3, 0.01      ;fade over note
> a1  poscil    aenv, k1, 1     ;pitched tone, faded out
> out a1*.4*.2                 ;scale down volume
> endin
>
>
>
>
> </CsInstruments>
> <CsScore>
> f 0 3600
> f1 0 1024 10 1
>
> t 0 120
>
> {16 CNT ;38 seconds long
>
> i4 [0   + 4*$CNT.]    0.25
> i4 [0.5 + 4*$CNT.]    0.25
> i4 [1   + 4*$CNT.]    0.25
> i4 [1.5 + 4*$CNT.]    0.25
> i4 [2   + 4*$CNT.]    0.25
> i4 [2.5 + 4*$CNT.]    0.25
> i4 [3   + 4*$CNT.]    0.25
> i4 [3.5 + 4*$CNT.]    0.25
>
> i2 [1 + 4*$CNT.] .25 .45
> i2 [3 + 4*$CNT.] .25 .45
>
> i3 [0   + 4*$CNT.] .25 100
> i3 [2   + 4*$CNT.] .25 100
> i3 [2.5 + 4*$CNT.] .25 100
>
> }
>
>
> </CsScore>
> </CsoundSynthesizer>
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> Csound@listserv.heanet.ie<mailto:Csound@listserv.heanet.ie>
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie<mailto:Csound@listserv.heanet.ie> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2019-12-11 20:10
FromVictor Lazzarini
SubjectRe: [Csnd] 2 Midi Files in one project
yes, not straightforward at all. The midifile data is played like a score, so it works a bit like the standard numeric score (where you can't have more than one in memory).

Of course you can stream rt midi data in, so an external midifile player or sequencer would do the job.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 11 Dec 2019, at 19:28, Rory Walsh <rorywalsh@ear.ie> wrote:

I'm guessing the fact that we don't already have one is indicative of it not being that straightforward? But I'm not really a MIDI guy..

On Wed, 11 Dec 2019 at 19:15, <pete.goodeve@computer.org> wrote:
On Wed, Dec 11, 2019 at 07:06:28PM +0000, Victor Lazzarini wrote:

> yes, you can only read one midifile per instance of Csound.

I guess it would be nice to have an opcode to specify a midifile to run.
Would this be hard?

Meanwhile, maybe a solution would be to use an external midifile player
to feed live MIDI to Csound.

        -- Pete --

>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
> On 11 Dec 2019, at 18:52, Rory Walsh <rorywalsh@ear.ie<mailto:rorywalsh@ear.ie>> wrote:
>
> Others will no better, but I didn't think this was possible. I've only ever seen examples of a single MIDI file loaded, but that doesn't mean it's not possible. Others, what say ye?
>
> On Wed, 11 Dec 2019 at 18:29, Mahubis <mark63888@gmail.com<mailto:mark63888@gmail.com>> wrote:
> I'm trying to play two separate midi files in one project. Bronson2 I have
> working fine. How should I approach bass.mid to get it to work alongside the
> other file. I have a feeling it's something about Midi numbers however I'm
> new to csound and unsure. I've posted the code below. I'm receiving an error
> message that the midi file won't load however I've made sure it's in the
> project file. Any help is appreciated, thanks.
>
> <CsoundSynthesizer>
> <CsOptions>
> -F Bronson2.mid
> -F bass.mid
> </CsOptions>
> <CsInstruments>
>
> ksmps = 10
> 0dbfs = 1
>
>
>   instr 1
> iamp        ampmidi 1
> ifr         cpsmidi
>
> aosc oscil iamp, ifr, 1
>
> afilt lpf18 aosc*.5, 1500, .89, .9
> out afilt*.02
>
>   endin
>
>     instr 5
> iamp        ampmidi 1
> ifr         cpsmidi
>
> aosc oscil iamp, ifr, 1
>
> afilt lpf18 aosc*.5, 1500, .89, .9
> out afilt*.02
>
>   endin
>
>   instr 4       ;hihat closed
>
> aamp      expon     .25,  0.1,   .001   ;short fade out...an a-rate
> exponantial line, a-rate makes it more accurate.
> arand     rand      aamp                ;random noise faded
> out arand*.1
>
> endin
>
> instr 2 ;snare
> iamp = p4
> aenv1   expon  iamp, 0.03, 0.01   ;short fade out
> a1      oscili aenv1, 147, 1        ;'ring' faded, 147 hz works well for
> snare
> ring.
> aamp    expon    .25,  0.2,  .001   ;short fade ut
> arand   rand     aamp               ;random noise faded
> out a1+arand*.2                 ;mix
> endin
>
> instr 3; kick
> ipitch = p4
> k1  expon    ipitch, .2, 50     ;detune...with user-controlled starting
> point.
> aenv expon 1, p3, 0.01      ;fade over note
> a1  poscil    aenv, k1, 1     ;pitched tone, faded out
> out a1*.4*.2                 ;scale down volume
> endin
>
>
>
>
> </CsInstruments>
> <CsScore>
> f 0 3600
> f1 0 1024 10 1
>
> t 0 120
>
> {16 CNT ;38 seconds long
>
> i4 [0   + 4*$CNT.]    0.25
> i4 [0.5 + 4*$CNT.]    0.25
> i4 [1   + 4*$CNT.]    0.25
> i4 [1.5 + 4*$CNT.]    0.25
> i4 [2   + 4*$CNT.]    0.25
> i4 [2.5 + 4*$CNT.]    0.25
> i4 [3   + 4*$CNT.]    0.25
> i4 [3.5 + 4*$CNT.]    0.25
>
> i2 [1 + 4*$CNT.] .25 .45
> i2 [3 + 4*$CNT.] .25 .45
>
> i3 [0   + 4*$CNT.] .25 100
> i3 [2   + 4*$CNT.] .25 100
> i3 [2.5 + 4*$CNT.] .25 100
>
> }
>
>
> </CsScore>
> </CsoundSynthesizer>
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> Csound@listserv.heanet.ie<mailto:Csound@listserv.heanet.ie>
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie<mailto:Csound@listserv.heanet.ie> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2019-12-11 20:51
FromRichard
SubjectRe: [Csnd] 2 Midi Files in one project

I would recommend mido, a Python midi library.

Richard

On 11/12/2019 21:10, Victor Lazzarini wrote:
yes, not straightforward at all. The midifile data is played like a score, so it works a bit like the standard numeric score (where you can't have more than one in memory).

Of course you can stream rt midi data in, so an external midifile player or sequencer would do the job.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 11 Dec 2019, at 19:28, Rory Walsh <rorywalsh@ear.ie> wrote:

I'm guessing the fact that we don't already have one is indicative of it not being that straightforward? But I'm not really a MIDI guy..

On Wed, 11 Dec 2019 at 19:15, <pete.goodeve@computer.org> wrote:
On Wed, Dec 11, 2019 at 07:06:28PM +0000, Victor Lazzarini wrote:

> yes, you can only read one midifile per instance of Csound.

I guess it would be nice to have an opcode to specify a midifile to run.
Would this be hard?

Meanwhile, maybe a solution would be to use an external midifile player
to feed live MIDI to Csound.

        -- Pete --

>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
> On 11 Dec 2019, at 18:52, Rory Walsh <rorywalsh@ear.ie<mailto:rorywalsh@ear.ie>> wrote:
>
> Others will no better, but I didn't think this was possible. I've only ever seen examples of a single MIDI file loaded, but that doesn't mean it's not possible. Others, what say ye?
>
> On Wed, 11 Dec 2019 at 18:29, Mahubis <mark63888@gmail.com<mailto:mark63888@gmail.com>> wrote:
> I'm trying to play two separate midi files in one project. Bronson2 I have
> working fine. How should I approach bass.mid to get it to work alongside the
> other file. I have a feeling it's something about Midi numbers however I'm
> new to csound and unsure. I've posted the code below. I'm receiving an error
> message that the midi file won't load however I've made sure it's in the
> project file. Any help is appreciated, thanks.
>
> <CsoundSynthesizer>
> <CsOptions>
> -F Bronson2.mid
> -F bass.mid
> </CsOptions>
> <CsInstruments>
>
> ksmps = 10
> 0dbfs = 1
>
>
>   instr 1
> iamp        ampmidi 1
> ifr         cpsmidi
>
> aosc oscil iamp, ifr, 1
>
> afilt lpf18 aosc*.5, 1500, .89, .9
> out afilt*.02
>
>   endin
>
>     instr 5
> iamp        ampmidi 1
> ifr         cpsmidi
>
> aosc oscil iamp, ifr, 1
>
> afilt lpf18 aosc*.5, 1500, .89, .9
> out afilt*.02
>
>   endin
>
>   instr 4       ;hihat closed
>
> aamp      expon     .25,  0.1,   .001   ;short fade out...an a-rate
> exponantial line, a-rate makes it more accurate.
> arand     rand      aamp                ;random noise faded
> out arand*.1
>
> endin
>
> instr 2 ;snare
> iamp = p4
> aenv1   expon  iamp, 0.03, 0.01   ;short fade out
> a1      oscili aenv1, 147, 1        ;'ring' faded, 147 hz works well for
> snare
> ring.
> aamp    expon    .25,  0.2,  .001   ;short fade ut
> arand   rand     aamp               ;random noise faded
> out a1+arand*.2                 ;mix
> endin
>
> instr 3; kick
> ipitch = p4
> k1  expon    ipitch, .2, 50     ;detune...with user-controlled starting
> point.
> aenv expon 1, p3, 0.01      ;fade over note
> a1  poscil    aenv, k1, 1     ;pitched tone, faded out
> out a1*.4*.2                 ;scale down volume
> endin
>
>
>
>
> </CsInstruments>
> <CsScore>
> f 0 3600
> f1 0 1024 10 1
>
> t 0 120
>
> {16 CNT ;38 seconds long
>
> i4 [0   + 4*$CNT.]    0.25
> i4 [0.5 + 4*$CNT.]    0.25
> i4 [1   + 4*$CNT.]    0.25
> i4 [1.5 + 4*$CNT.]    0.25
> i4 [2   + 4*$CNT.]    0.25
> i4 [2.5 + 4*$CNT.]    0.25
> i4 [3   + 4*$CNT.]    0.25
> i4 [3.5 + 4*$CNT.]    0.25
>
> i2 [1 + 4*$CNT.] .25 .45
> i2 [3 + 4*$CNT.] .25 .45
>
> i3 [0   + 4*$CNT.] .25 100
> i3 [2   + 4*$CNT.] .25 100
> i3 [2.5 + 4*$CNT.] .25 100
>
> }
>
>
> </CsScore>
> </CsoundSynthesizer>
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> Csound@listserv.heanet.ie<mailto:Csound@listserv.heanet.ie>
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie<mailto:Csound@listserv.heanet.ie> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here