Csound Csound-dev Csound-tekno Search About

Csound Video Stream: 2-channel Concurrent/Asynchronous Audio Playback

Date2017-02-10 08:00
FromDavid Akbari
SubjectCsound Video Stream: 2-channel Concurrent/Asynchronous Audio Playback
Hello all,

I have been messing around with concurrent audio playback, and I made
a little .CSD. Now this by itself is not unusual, but for some reason
I decided to stream the development process. This can possibly double
as a video manual for how this works. Send me your tweets and hate
mail. Call the fashion police, and so on.

The system is not complete yet, but I figured this could trigger a chuckle.

Originally this was a commission for someone looking to cut costs on a
wedding by not hiring a DJ. Their hardware options were quite limited,
so I am now improving the system, and figured I would share. For the
simple application of just running wedding music tracks into each
other, this works fine.

I realize this is quite a niche, but let me know if this type of
stream content is something that has value to the community. I would
be down to stream more hair brained hi-jinx if there's an appetite for
more Csound related video content.

Cheers,
David

https://www.twitch.tv/videos/121017003



-odac -+rtmidi=portmidi -+rtaudio=mme



;  Design Inputs
;  A quick way to hear how two sound files, matched to speed, played
; simultaneously.
;
;  Mono sound output as a premise
;  The limitation is using a single 2 channel soundcard to have both
; Pre-Fade Listen (PFL)
;   and master as distinct outputs
;  The vision is to only route the RIGHT channel to a sound mixer and
; have Left be PFL
;  Other premise is only a single swipe strip
;
;  PFL on channel 1, toggle sound source between two sources of
; program material,
;  routing to channel 2
;  a1+a2 stereo sum/scale on channel 2
;  Option to mute channel 1 to swap into copy of channel 2
;
;  Swipe strip pitch +-8%
;  Fixed interval, linear mapping via table
;  Only active PFL source changes speed
;
;  Keyboard keys to control:
;  Mute, start/stop playback each channel and reset time index,
;  file select each channel,
;  toggle sound source channel 1,
;  volume each channel steps of 3-6 dB
;
; Start stop and queue with persistent time index

sr = 44100
ksmps = 10
nchnls = 2

#define RELEASELUV # "C:/Users/LENOVO/Downloads/LeonMar.wav" #
#define NEXTSOUND # "C:/Users/LENOVO/Downloads/JustJungle-NextSound.wav" #

gklsp init 0
gkrsp init 0

zakinit 8, 8
; zak bus IO:
; zk1 Source 1 to master out
; zk2 Source 2 to master out
; zk3 Scaling data
; zk4 Toggle speed Source 1
; zk5 Toggle speed Source 2
; za1 Master Out L
; za2 Master Out R

;/---
instr 1
;Key List by Numeric Index:
;32 : Space
;101 : e
;108 : l
;76 : L
;114 : r
;82 : R
;91 : [
;93 : ]
;61 : =
;45 : -
;49 : 1
;50 : 2
;51 : 3
;52 : 4
;53 : 5
;54 : 6
;55 : 7
;56 : 8
;57 : 9
;48 : 0

;zak private variables
klswitch init 0
krswitch init 0
klmst init 0
krmst init 0
kspchl init 0
kspchr init 0

kkey,ktoggle sensekey
;printk2 kkey

  if (kkey != 0 && ktoggle == 1) then

;"e" stops performance
if kkey == 101 then
 event "e", 0, 0
    endif

; "l" triggers release the love PFL
    if (kkey == 108 && klswitch == 0) then
 event "i", 100, 0, -1
 klswitch = 1
else if (kkey == 108 && klswitch == 1) then
 turnoff2 100, 0, 1
 klswitch = 0
endif
    endif
; "r" triggers next sound PFL
    if (kkey == 114 && krswitch == 0) then
 event "i", 101, 0, -1
 krswitch = 1
else if (kkey == 114 && krswitch == 1) then
 turnoff2 101, 0, 1
 krswitch = 0
endif
    endif

; "L" write to master out
    if (kkey == 76 && klmst == 0) then
 klmst = 1
zkw klmst, 0
else if (kkey == 76 && klmst == 1) then
 klmst = 0
zkw klmst, 0
endif
    endif

; "R" write to master out
    if (kkey == 82 && krmst == 0) then
 krmst = 1
zkw krmst, 1
else if (kkey == 82 && krmst == 1) then
 krmst = 0
zkw krmst, 1
endif
    endif

; "1" adjust only channel 1 speed toggle
    if (kkey == 49 && kspchl == 0) then
 kspchl = 1
zkw kspchl, 4
else if (kkey == 49 && kspchl == 1) then
 kspchl = 0
zkw kspchl, 4
endif
    endif

; "2" adjust only channel 2 speed toggle
    if (kkey == 50 && kspchr == 0) then
 kspchr = 1
zkw kspchr, 5
else if (kkey == 50 && kspchr == 1) then
 kspchr = 0
zkw kspchr, 5
endif
    endif
  endif

endin

;/---

instr 10 ; brain instrument - control structure

;kstatus, kchan, kdata1, kdata2 midiin

; printk2 kstatus
; printk2 kchan
; printk2 kdata1
; printk2 kdata2
;kscl init 64
kpos init 64
kpos ctrl7 1, 20, 0, 127
kpos = kpos/127

kscl scale kpos, 1.12, 0.88

zkw kscl, 2
endin

;/---

instr 100 ; Leon Mar- Release the Love
; kpch = 1 ;for now, variable later

klm zkr 0
krm zkr 1

kpch init 1

kspl zkr 4

if (kspl == 1) then
kpch zkr 2
else
kpch = kpch
endif
aL, aR diskin2 $RELEASELUV, kpch, 0, 1


/*
; channel 1 PFL toggle to master
if (klm == 0) then
zawm aL, 0
else if (klm == 1) then
zawm aL, 1
endif
endif

; channel 2 PFL toggle to master
if (krm == 0) then
zawm aR, 0
else if (krm == 1) then
zawm aR, 1
endif
endif
*/

if (klm == 0) then
zawm aL, 0
zawm aR, 0
else if (klm == 1) then
zawm aL, 1
zawm aR, 1
endif
endif
endin
;/---

instr 101 ; Just Jungle Next Sound (1996)
; kpch = 1 ;for now, variable later

klm zkr 0
krm zkr 1

kpch init 1

kspr zkr 5

if (kspr == 1) then
kpch zkr 2
else
kpch = kpch
endif
aL, aR diskin2 $NEXTSOUND, kpch, 0, 1

/*
; channel 1 PFL toggle to master
if (klm == 0) then
zawm aL, 0
else if (klm == 1) then
zawm aL, 1
endif
endif

; channel 2 PFL toggle to master
if (krm == 0) then
zawm aR, 0
else if (krm == 1) then
zawm aR, 1
endif
endif
*/

if (krm == 0) then
zawm aL, 0
zawm aR, 0
else if (krm == 1) then
zawm aL, 1
zawm aR, 1
endif
endif
endin
;/---
instr 111 ; master output strip

aL zar 0
aR zar 1

outs aL, aR
zacl 0, 8
;zkcl 0, 2
endin

;/---


f0 3600
i1.1 0 -1
i10.1 0 -1
i111.1 0 -1

e



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

Date2017-02-10 08:41
FromRory Walsh
SubjectRe: Csound Video Stream: 2-channel Concurrent/Asynchronous Audio Playback
Keep em coming David! I always find these thing interesting to watch. Beats Netflix! 

On 10 Feb 2017 08:10, "David Akbari" <dakbari@gmail.com> wrote:
Hello all,

I have been messing around with concurrent audio playback, and I made
a little .CSD. Now this by itself is not unusual, but for some reason
I decided to stream the development process. This can possibly double
as a video manual for how this works. Send me your tweets and hate
mail. Call the fashion police, and so on.

The system is not complete yet, but I figured this could trigger a chuckle.

Originally this was a commission for someone looking to cut costs on a
wedding by not hiring a DJ. Their hardware options were quite limited,
so I am now improving the system, and figured I would share. For the
simple application of just running wedding music tracks into each
other, this works fine.

I realize this is quite a niche, but let me know if this type of
stream content is something that has value to the community. I would
be down to stream more hair brained hi-jinx if there's an appetite for
more Csound related video content.

Cheers,
David

https://www.twitch.tv/videos/121017003

<CsoundSynthesizer>
<CsOptions>
-odac -+rtmidi=portmidi -+rtaudio=mme
</CsOptions>
<CsInstruments>

;  Design Inputs
;  A quick way to hear how two sound files, matched to speed, played
; simultaneously.
;
;  Mono sound output as a premise
;  The limitation is using a single 2 channel soundcard to have both
; Pre-Fade Listen (PFL)
;   and master as distinct outputs
;  The vision is to only route the RIGHT channel to a sound mixer and
; have Left be PFL
;  Other premise is only a single swipe strip
;
;  PFL on channel 1, toggle sound source between two sources of
; program material,
;  routing to channel 2
;  a1+a2 stereo sum/scale on channel 2
;  Option to mute channel 1 to swap into copy of channel 2
;
;  Swipe strip pitch +-8%
;  Fixed interval, linear mapping via table
;  Only active PFL source changes speed
;
;  Keyboard keys to control:
;  Mute, start/stop playback each channel and reset time index,
;  file select each channel,
;  toggle sound source channel 1,
;  volume each channel steps of 3-6 dB
;
; Start stop and queue with persistent time index

sr = 44100
ksmps = 10
nchnls = 2

#define RELEASELUV # "C:/Users/LENOVO/Downloads/LeonMar.wav" #
#define NEXTSOUND # "C:/Users/LENOVO/Downloads/JustJungle-NextSound.wav" #

gklsp init 0
gkrsp init 0

zakinit 8, 8
; zak bus IO:
; zk1 Source 1 to master out
; zk2 Source 2 to master out
; zk3 Scaling data
; zk4 Toggle speed Source 1
; zk5 Toggle speed Source 2
; za1 Master Out L
; za2 Master Out R

;/---
instr 1
;Key List by Numeric Index:
;32 : Space
;101 : e
;108 : l
;76 : L
;114 : r
;82 : R
;91 : [
;93 : ]
;61 : =
;45 : -
;49 : 1
;50 : 2
;51 : 3
;52 : 4
;53 : 5
;54 : 6
;55 : 7
;56 : 8
;57 : 9
;48 : 0

;zak private variables
klswitch init 0
krswitch init 0
klmst init 0
krmst init 0
kspchl init 0
kspchr init 0

kkey,ktoggle sensekey
;printk2 kkey

  if (kkey != 0 && ktoggle == 1) then

;"e" stops performance
if kkey == 101 then
 event "e", 0, 0
    endif

; "l" triggers release the love PFL
    if (kkey == 108 && klswitch == 0) then
 event "i", 100, 0, -1
 klswitch = 1
else if (kkey == 108 && klswitch == 1) then
 turnoff2 100, 0, 1
 klswitch = 0
endif
    endif
; "r" triggers next sound PFL
    if (kkey == 114 && krswitch == 0) then
 event "i", 101, 0, -1
 krswitch = 1
else if (kkey == 114 && krswitch == 1) then
 turnoff2 101, 0, 1
 krswitch = 0
endif
    endif

; "L" write to master out
    if (kkey == 76 && klmst == 0) then
 klmst = 1
zkw klmst, 0
else if (kkey == 76 && klmst == 1) then
 klmst = 0
zkw klmst, 0
endif
    endif

; "R" write to master out
    if (kkey == 82 && krmst == 0) then
 krmst = 1
zkw krmst, 1
else if (kkey == 82 && krmst == 1) then
 krmst = 0
zkw krmst, 1
endif
    endif

; "1" adjust only channel 1 speed toggle
    if (kkey == 49 && kspchl == 0) then
 kspchl = 1
zkw kspchl, 4
else if (kkey == 49 && kspchl == 1) then
 kspchl = 0
zkw kspchl, 4
endif
    endif

; "2" adjust only channel 2 speed toggle
    if (kkey == 50 && kspchr == 0) then
 kspchr = 1
zkw kspchr, 5
else if (kkey == 50 && kspchr == 1) then
 kspchr = 0
zkw kspchr, 5
endif
    endif
  endif

endin

;/---

instr 10 ; brain instrument - control structure

;kstatus, kchan, kdata1, kdata2 midiin

; printk2 kstatus
; printk2 kchan
; printk2 kdata1
; printk2 kdata2
;kscl init 64
kpos init 64
kpos ctrl7 1, 20, 0, 127
kpos = kpos/127

kscl scale kpos, 1.12, 0.88

zkw kscl, 2
endin

;/---

instr 100 ; Leon Mar- Release the Love
; kpch = 1 ;for now, variable later

klm zkr 0
krm zkr 1

kpch init 1

kspl zkr 4

if (kspl == 1) then
kpch zkr 2
else
kpch = kpch
endif
aL, aR diskin2 $RELEASELUV, kpch, 0, 1


/*
; channel 1 PFL toggle to master
if (klm == 0) then
zawm aL, 0
else if (klm == 1) then
zawm aL, 1
endif
endif

; channel 2 PFL toggle to master
if (krm == 0) then
zawm aR, 0
else if (krm == 1) then
zawm aR, 1
endif
endif
*/

if (klm == 0) then
zawm aL, 0
zawm aR, 0
else if (klm == 1) then
zawm aL, 1
zawm aR, 1
endif
endif
endin
;/---

instr 101 ; Just Jungle Next Sound (1996)
; kpch = 1 ;for now, variable later

klm zkr 0
krm zkr 1

kpch init 1

kspr zkr 5

if (kspr == 1) then
kpch zkr 2
else
kpch = kpch
endif
aL, aR diskin2 $NEXTSOUND, kpch, 0, 1

/*
; channel 1 PFL toggle to master
if (klm == 0) then
zawm aL, 0
else if (klm == 1) then
zawm aL, 1
endif
endif

; channel 2 PFL toggle to master
if (krm == 0) then
zawm aR, 0
else if (krm == 1) then
zawm aR, 1
endif
endif
*/

if (krm == 0) then
zawm aL, 0
zawm aR, 0
else if (krm == 1) then
zawm aL, 1
zawm aR, 1
endif
endif
endin
;/---
instr 111 ; master output strip

aL zar 0
aR zar 1

outs aL, aR
zacl 0, 8
;zkcl 0, 2
endin

;/---
</CsInstruments>
<CsScore>
f0 3600
i1.1 0 -1
i10.1 0 -1
i111.1 0 -1

e
</CsScore>
</CsoundSynthesizer>

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

Date2017-02-10 08:53
From"Dr. Richard Boulanger"
SubjectRe: Csound Video Stream: 2-channel Concurrent/Asynchronous Audio Playback
David,

Thanks for sharing.

A very cool instrument.

Great to see and hear you in the video.

I agree with Rory.... Keep them coming!
Love it. 
Looking forward to sharing with the class next week.

Hope you are well and doing well.

Get in touch and let's catch up.

Dr.B.


On Fri, Feb 10, 2017 at 3:00 AM, David Akbari <dakbari@gmail.com> wrote:
Hello all,

I have been messing around with concurrent audio playback, and I made
a little .CSD. Now this by itself is not unusual, but for some reason
I decided to stream the development process. This can possibly double
as a video manual for how this works. Send me your tweets and hate
mail. Call the fashion police, and so on.

The system is not complete yet, but I figured this could trigger a chuckle.

Originally this was a commission for someone looking to cut costs on a
wedding by not hiring a DJ. Their hardware options were quite limited,
so I am now improving the system, and figured I would share. For the
simple application of just running wedding music tracks into each
other, this works fine.

I realize this is quite a niche, but let me know if this type of
stream content is something that has value to the community. I would
be down to stream more hair brained hi-jinx if there's an appetite for
more Csound related video content.

Cheers,
David

https://www.twitch.tv/videos/121017003

<CsoundSynthesizer>
<CsOptions>
-odac -+rtmidi=portmidi -+rtaudio=mme
</CsOptions>
<CsInstruments>

;  Design Inputs
;  A quick way to hear how two sound files, matched to speed, played
; simultaneously.
;
;  Mono sound output as a premise
;  The limitation is using a single 2 channel soundcard to have both
; Pre-Fade Listen (PFL)
;   and master as distinct outputs
;  The vision is to only route the RIGHT channel to a sound mixer and
; have Left be PFL
;  Other premise is only a single swipe strip
;
;  PFL on channel 1, toggle sound source between two sources of
; program material,
;  routing to channel 2
;  a1+a2 stereo sum/scale on channel 2
;  Option to mute channel 1 to swap into copy of channel 2
;
;  Swipe strip pitch +-8%
;  Fixed interval, linear mapping via table
;  Only active PFL source changes speed
;
;  Keyboard keys to control:
;  Mute, start/stop playback each channel and reset time index,
;  file select each channel,
;  toggle sound source channel 1,
;  volume each channel steps of 3-6 dB
;
; Start stop and queue with persistent time index

sr = 44100
ksmps = 10
nchnls = 2

#define RELEASELUV # "C:/Users/LENOVO/Downloads/LeonMar.wav" #
#define NEXTSOUND # "C:/Users/LENOVO/Downloads/JustJungle-NextSound.wav" #

gklsp init 0
gkrsp init 0

zakinit 8, 8
; zak bus IO:
; zk1 Source 1 to master out
; zk2 Source 2 to master out
; zk3 Scaling data
; zk4 Toggle speed Source 1
; zk5 Toggle speed Source 2
; za1 Master Out L
; za2 Master Out R

;/---
instr 1
;Key List by Numeric Index:
;32 : Space
;101 : e
;108 : l
;76 : L
;114 : r
;82 : R
;91 : [
;93 : ]
;61 : =
;45 : -
;49 : 1
;50 : 2
;51 : 3
;52 : 4
;53 : 5
;54 : 6
;55 : 7
;56 : 8
;57 : 9
;48 : 0

;zak private variables
klswitch init 0
krswitch init 0
klmst init 0
krmst init 0
kspchl init 0
kspchr init 0

kkey,ktoggle sensekey
;printk2 kkey

  if (kkey != 0 && ktoggle == 1) then

;"e" stops performance
if kkey == 101 then
 event "e", 0, 0
    endif

; "l" triggers release the love PFL
    if (kkey == 108 && klswitch == 0) then
 event "i", 100, 0, -1
 klswitch = 1
else if (kkey == 108 && klswitch == 1) then
 turnoff2 100, 0, 1
 klswitch = 0
endif
    endif
; "r" triggers next sound PFL
    if (kkey == 114 && krswitch == 0) then
 event "i", 101, 0, -1
 krswitch = 1
else if (kkey == 114 && krswitch == 1) then
 turnoff2 101, 0, 1
 krswitch = 0
endif
    endif

; "L" write to master out
    if (kkey == 76 && klmst == 0) then
 klmst = 1
zkw klmst, 0
else if (kkey == 76 && klmst == 1) then
 klmst = 0
zkw klmst, 0
endif
    endif

; "R" write to master out
    if (kkey == 82 && krmst == 0) then
 krmst = 1
zkw krmst, 1
else if (kkey == 82 && krmst == 1) then
 krmst = 0
zkw krmst, 1
endif
    endif

; "1" adjust only channel 1 speed toggle
    if (kkey == 49 && kspchl == 0) then
 kspchl = 1
zkw kspchl, 4
else if (kkey == 49 && kspchl == 1) then
 kspchl = 0
zkw kspchl, 4
endif
    endif

; "2" adjust only channel 2 speed toggle
    if (kkey == 50 && kspchr == 0) then
 kspchr = 1
zkw kspchr, 5
else if (kkey == 50 && kspchr == 1) then
 kspchr = 0
zkw kspchr, 5
endif
    endif
  endif

endin

;/---

instr 10 ; brain instrument - control structure

;kstatus, kchan, kdata1, kdata2 midiin

; printk2 kstatus
; printk2 kchan
; printk2 kdata1
; printk2 kdata2
;kscl init 64
kpos init 64
kpos ctrl7 1, 20, 0, 127
kpos = kpos/127

kscl scale kpos, 1.12, 0.88

zkw kscl, 2
endin

;/---

instr 100 ; Leon Mar- Release the Love
; kpch = 1 ;for now, variable later

klm zkr 0
krm zkr 1

kpch init 1

kspl zkr 4

if (kspl == 1) then
kpch zkr 2
else
kpch = kpch
endif
aL, aR diskin2 $RELEASELUV, kpch, 0, 1


/*
; channel 1 PFL toggle to master
if (klm == 0) then
zawm aL, 0
else if (klm == 1) then
zawm aL, 1
endif
endif

; channel 2 PFL toggle to master
if (krm == 0) then
zawm aR, 0
else if (krm == 1) then
zawm aR, 1
endif
endif
*/

if (klm == 0) then
zawm aL, 0
zawm aR, 0
else if (klm == 1) then
zawm aL, 1
zawm aR, 1
endif
endif
endin
;/---

instr 101 ; Just Jungle Next Sound (1996)
; kpch = 1 ;for now, variable later

klm zkr 0
krm zkr 1

kpch init 1

kspr zkr 5

if (kspr == 1) then
kpch zkr 2
else
kpch = kpch
endif
aL, aR diskin2 $NEXTSOUND, kpch, 0, 1

/*
; channel 1 PFL toggle to master
if (klm == 0) then
zawm aL, 0
else if (klm == 1) then
zawm aL, 1
endif
endif

; channel 2 PFL toggle to master
if (krm == 0) then
zawm aR, 0
else if (krm == 1) then
zawm aR, 1
endif
endif
*/

if (krm == 0) then
zawm aL, 0
zawm aR, 0
else if (krm == 1) then
zawm aL, 1
zawm aR, 1
endif
endif
endin
;/---
instr 111 ; master output strip

aL zar 0
aR zar 1

outs aL, aR
zacl 0, 8
;zkcl 0, 2
endin

;/---
</CsInstruments>
<CsScore>
f0 3600
i1.1 0 -1
i10.1 0 -1
i111.1 0 -1

e
</CsScore>
</CsoundSynthesizer>

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

Date2017-02-10 09:17
From"Dr. Richard Boulanger"
SubjectRe: Csound Video Stream: 2-channel Concurrent/Asynchronous Audio Playback
You are right David...

It is very challenging to line up the tempi.  But a lot of fun!

I am using a VMeter as my speed-slider.

-dB
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

Date2017-02-10 17:58
FromDavid Akbari
SubjectRe: Csound Video Stream: 2-channel Concurrent/Asynchronous Audio Playback
Thanks gents! It is great to know there is a venue for this type of
shared experience.

I have never thought to document the development process, it's really
quite eye-opening to go back and examine the thought process. I am
trying to improve the development process, and documented
introspection can be a tool to accomplish this. Cognitive optimization
regarding design and development as distinct processes, and borrowing
concepts from my day job in medical device development. Of course with
some eccentricity mixed in; this cannot be helped.

Part 2 - Demonstrating Pitch Modulation and Design Verification wrap-up
https://www.twitch.tv/videos/121089671
Audio demo with pitch modulation and comments on design output / verification.

It's great to see you guys are still around! I have been quietly using
Csound for years, but more and more people are asking me to show the
same things over and over. Why not use the Twitch creative format as a
platform to share and document the experience.

Future developments to stream, because they must be explained in detail:
* Unscented Kalman filter implementation using new array structures
and linear algebra opcodes for envelope manipulation (time domain) as
well as f-sig stencil manipulation (freq domain) for music
composition.
* Demonstrating the 16-channel multi-band compression mastering
approach used for this band's recording done on commission (I work for
hamburgers). http://confusedbrothers.com/music/
( Tracks using Csound for multi-channel quality control / mastering:
"Use Me Up," "Skin and Sheets," "Hill City," and "Partying in the
Streets" )
* OSC, Pd, and Tcl/Tk integration for display of otherwise 'invisible'
parameters; parallel and distinct Audio and Video processing as a
premise.
* Showing my backwards and probably wrong approach to composing
original music using Blue and Cabbage that somehow results in finished
products somewhere between cacophony and silence.

Provided you are crazy, stubborn, and patient enough this could be
enjoyable to you!

Cheers,
David

On Fri, Feb 10, 2017 at 2:53 AM, Dr. Richard Boulanger
 wrote:
> David,
>
> Thanks for sharing.
>
> A very cool instrument.
>
> Great to see and hear you in the video.
>
> I agree with Rory.... Keep them coming!
> Love it.
> Looking forward to sharing with the class next week.
>
> Hope you are well and doing well.
>
> Get in touch and let's catch up.
>
> Dr.B.
>
>
> On Fri, Feb 10, 2017 at 3:00 AM, David Akbari  wrote:
>>
>> Hello all,
>>
>> I have been messing around with concurrent audio playback, and I made
>> a little .CSD. Now this by itself is not unusual, but for some reason
>> I decided to stream the development process. This can possibly double
>> as a video manual for how this works. Send me your tweets and hate
>> mail. Call the fashion police, and so on.
>>
>> The system is not complete yet, but I figured this could trigger a
>> chuckle.
>>
>> Originally this was a commission for someone looking to cut costs on a
>> wedding by not hiring a DJ. Their hardware options were quite limited,
>> so I am now improving the system, and figured I would share. For the
>> simple application of just running wedding music tracks into each
>> other, this works fine.
>>
>> I realize this is quite a niche, but let me know if this type of
>> stream content is something that has value to the community. I would
>> be down to stream more hair brained hi-jinx if there's an appetite for
>> more Csound related video content.
>>
>> Cheers,
>> David
>>
>> https://www.twitch.tv/videos/121017003
>>
>> 
>> 
>> -odac -+rtmidi=portmidi -+rtaudio=mme
>> 
>> 
>>
>> ;  Design Inputs
>> ;  A quick way to hear how two sound files, matched to speed, played
>> ; simultaneously.
>> ;
>> ;  Mono sound output as a premise
>> ;  The limitation is using a single 2 channel soundcard to have both
>> ; Pre-Fade Listen (PFL)
>> ;   and master as distinct outputs
>> ;  The vision is to only route the RIGHT channel to a sound mixer and
>> ; have Left be PFL
>> ;  Other premise is only a single swipe strip
>> ;
>> ;  PFL on channel 1, toggle sound source between two sources of
>> ; program material,
>> ;  routing to channel 2
>> ;  a1+a2 stereo sum/scale on channel 2
>> ;  Option to mute channel 1 to swap into copy of channel 2
>> ;
>> ;  Swipe strip pitch +-8%
>> ;  Fixed interval, linear mapping via table
>> ;  Only active PFL source changes speed
>> ;
>> ;  Keyboard keys to control:
>> ;  Mute, start/stop playback each channel and reset time index,
>> ;  file select each channel,
>> ;  toggle sound source channel 1,
>> ;  volume each channel steps of 3-6 dB
>> ;
>> ; Start stop and queue with persistent time index
>>
>> sr = 44100
>> ksmps = 10
>> nchnls = 2
>>
>> #define RELEASELUV # "C:/Users/LENOVO/Downloads/LeonMar.wav" #
>> #define NEXTSOUND # "C:/Users/LENOVO/Downloads/JustJungle-NextSound.wav" #
>>
>> gklsp init 0
>> gkrsp init 0
>>
>> zakinit 8, 8
>> ; zak bus IO:
>> ; zk1 Source 1 to master out
>> ; zk2 Source 2 to master out
>> ; zk3 Scaling data
>> ; zk4 Toggle speed Source 1
>> ; zk5 Toggle speed Source 2
>> ; za1 Master Out L
>> ; za2 Master Out R
>>
>> ;/---
>> instr 1
>> ;Key List by Numeric Index:
>> ;32 : Space
>> ;101 : e
>> ;108 : l
>> ;76 : L
>> ;114 : r
>> ;82 : R
>> ;91 : [
>> ;93 : ]
>> ;61 : =
>> ;45 : -
>> ;49 : 1
>> ;50 : 2
>> ;51 : 3
>> ;52 : 4
>> ;53 : 5
>> ;54 : 6
>> ;55 : 7
>> ;56 : 8
>> ;57 : 9
>> ;48 : 0
>>
>> ;zak private variables
>> klswitch init 0
>> krswitch init 0
>> klmst init 0
>> krmst init 0
>> kspchl init 0
>> kspchr init 0
>>
>> kkey,ktoggle sensekey
>> ;printk2 kkey
>>
>>   if (kkey != 0 && ktoggle == 1) then
>>
>> ;"e" stops performance
>> if kkey == 101 then
>>  event "e", 0, 0
>>     endif
>>
>> ; "l" triggers release the love PFL
>>     if (kkey == 108 && klswitch == 0) then
>>  event "i", 100, 0, -1
>>  klswitch = 1
>> else if (kkey == 108 && klswitch == 1) then
>>  turnoff2 100, 0, 1
>>  klswitch = 0
>> endif
>>     endif
>> ; "r" triggers next sound PFL
>>     if (kkey == 114 && krswitch == 0) then
>>  event "i", 101, 0, -1
>>  krswitch = 1
>> else if (kkey == 114 && krswitch == 1) then
>>  turnoff2 101, 0, 1
>>  krswitch = 0
>> endif
>>     endif
>>
>> ; "L" write to master out
>>     if (kkey == 76 && klmst == 0) then
>>  klmst = 1
>> zkw klmst, 0
>> else if (kkey == 76 && klmst == 1) then
>>  klmst = 0
>> zkw klmst, 0
>> endif
>>     endif
>>
>> ; "R" write to master out
>>     if (kkey == 82 && krmst == 0) then
>>  krmst = 1
>> zkw krmst, 1
>> else if (kkey == 82 && krmst == 1) then
>>  krmst = 0
>> zkw krmst, 1
>> endif
>>     endif
>>
>> ; "1" adjust only channel 1 speed toggle
>>     if (kkey == 49 && kspchl == 0) then
>>  kspchl = 1
>> zkw kspchl, 4
>> else if (kkey == 49 && kspchl == 1) then
>>  kspchl = 0
>> zkw kspchl, 4
>> endif
>>     endif
>>
>> ; "2" adjust only channel 2 speed toggle
>>     if (kkey == 50 && kspchr == 0) then
>>  kspchr = 1
>> zkw kspchr, 5
>> else if (kkey == 50 && kspchr == 1) then
>>  kspchr = 0
>> zkw kspchr, 5
>> endif
>>     endif
>>   endif
>>
>> endin
>>
>> ;/---
>>
>> instr 10 ; brain instrument - control structure
>>
>> ;kstatus, kchan, kdata1, kdata2 midiin
>>
>> ; printk2 kstatus
>> ; printk2 kchan
>> ; printk2 kdata1
>> ; printk2 kdata2
>> ;kscl init 64
>> kpos init 64
>> kpos ctrl7 1, 20, 0, 127
>> kpos = kpos/127
>>
>> kscl scale kpos, 1.12, 0.88
>>
>> zkw kscl, 2
>> endin
>>
>> ;/---
>>
>> instr 100 ; Leon Mar- Release the Love
>> ; kpch = 1 ;for now, variable later
>>
>> klm zkr 0
>> krm zkr 1
>>
>> kpch init 1
>>
>> kspl zkr 4
>>
>> if (kspl == 1) then
>> kpch zkr 2
>> else
>> kpch = kpch
>> endif
>> aL, aR diskin2 $RELEASELUV, kpch, 0, 1
>>
>>
>> /*
>> ; channel 1 PFL toggle to master
>> if (klm == 0) then
>> zawm aL, 0
>> else if (klm == 1) then
>> zawm aL, 1
>> endif
>> endif
>>
>> ; channel 2 PFL toggle to master
>> if (krm == 0) then
>> zawm aR, 0
>> else if (krm == 1) then
>> zawm aR, 1
>> endif
>> endif
>> */
>>
>> if (klm == 0) then
>> zawm aL, 0
>> zawm aR, 0
>> else if (klm == 1) then
>> zawm aL, 1
>> zawm aR, 1
>> endif
>> endif
>> endin
>> ;/---
>>
>> instr 101 ; Just Jungle Next Sound (1996)
>> ; kpch = 1 ;for now, variable later
>>
>> klm zkr 0
>> krm zkr 1
>>
>> kpch init 1
>>
>> kspr zkr 5
>>
>> if (kspr == 1) then
>> kpch zkr 2
>> else
>> kpch = kpch
>> endif
>> aL, aR diskin2 $NEXTSOUND, kpch, 0, 1
>>
>> /*
>> ; channel 1 PFL toggle to master
>> if (klm == 0) then
>> zawm aL, 0
>> else if (klm == 1) then
>> zawm aL, 1
>> endif
>> endif
>>
>> ; channel 2 PFL toggle to master
>> if (krm == 0) then
>> zawm aR, 0
>> else if (krm == 1) then
>> zawm aR, 1
>> endif
>> endif
>> */
>>
>> if (krm == 0) then
>> zawm aL, 0
>> zawm aR, 0
>> else if (krm == 1) then
>> zawm aL, 1
>> zawm aR, 1
>> endif
>> endif
>> endin
>> ;/---
>> instr 111 ; master output strip
>>
>> aL zar 0
>> aR zar 1
>>
>> outs aL, aR
>> zacl 0, 8
>> ;zkcl 0, 2
>> endin
>>
>> ;/---
>> 
>> 
>> f0 3600
>> i1.1 0 -1
>> i10.1 0 -1
>> i111.1 0 -1
>>
>> e
>> 
>> 
>>
>> 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