Ok good to know!  The csound api is a separate thing from 
csound-expression then.  I thought they were two implementations of the 
same interface, that clears things up for me.

I got hCsound to compile (on debian), I just had to add the line:

  include-dirs:    /usr/include/csound

to hCsound.cabal.  Haven't tested it beyond that though.

On 06/21/2014 10:12 AM, John Lato wrote:
> On Jun 21, 2014 12:47 AM, "Anton Kholomiov"<anton.kholom...@gmail.com>
> wrote:
>> Yes, you can. Csound is not only a programm (compiler)
>> but also a C API. There are bindings for C, Java, Python.
> There is also a Haskell binding to the Csound API.  Although I think it's a
> bit out of date, I'll try to update it this week.
>
> John
>
>> We can generate a Csd file, and the execute it within
>> other program. We can interact with csd over OSC-messages
>> and with API over channels
>>
>>
>> 2014-06-21 0:10 GMT+04:00 Ben Burdette<bburde...@gmail.com>:
>>
>>> Cool!
>>>
>>> If I have my own interface written in haskell, in QT or openGL for
>>> instance, can I trigger events in csound from that?  It looks like the
>>> csound gui stuff is csound communicating with itself, and not haskell
>>> communicating with csound.  Ie, we tell csound to create a slider, and
>>> then start csound, but after that haskell has no interaction.  Is that
>>> correct?
>>>
>>> I'm looking to run a program on a raspberry pi that has no keyboard or
>>> gui itself, and control the sound output from haskell, which would read
>>> network messages and play sounds in response.  So the realtime input
>>> would be from another machine.  I looked at csound-expression for this
>>> but I couldn't figure out if realtime interaction from haskell is
>>> possible.  Maybe through OSC messages?
>>>
>>> On 06/20/2014 01:50 PM, Anton Kholomiov wrote:
>>>> Yes, you can even create Gui-widgets
>>>>
>>>>
> https://github.com/anton-k/csound-expression/blob/master/tutorial/QuickStart.markdown#gui-elements
>>>> I have to admit that keyboard interaction is not so thoroughly
> tested. It
>>>> can be buggy..
>>>> You can make an issue in github) Any help is welcome
>>>>
>>>>
>>>> 2014-06-20 23:34 GMT+04:00 Ben Burdette<bburde...@gmail.com>:
>>>>
>>>>> Nice!  That looks easy to use.
>>>>>
>>>>> Is it possible to kick off sample playback from haskell in real
> time, in
>>>>> response to keyboard events for instance?
>>>>>
>>>>> On 06/20/2014 01:17 PM, Anton Kholomiov wrote:
>>>>>> I wanted to mix a drum-loop with the tanpura sound to play along
>>>>>> with bansuri flute. I've got a short drum-loop and looong file of
> the
>>>>>> tanpura drone and haskell. So I've done it with my library
>>>>>> csound-expression and moved the usefull functionality in the
>>>>>> library. Now it's much easier to play sound files.
>>>>>>
>>>>>> And..
>>>>>>
>>>>>> I'd like to announce the new version of the library
> 'csound-expression'
>>>>> [1]
>>>>>> With new functions it's very easy to read and playback sound files.
>>>>>> recently I wanted to make a simple mix of drum loop with harmony.
>>>>>> With new functions it's as simple as
>>>>>>
>>>>>> ~~~
>>>>>> module Main where
>>>>>>
>>>>>> import Csound.Base
>>>>>>
>>>>>> -- ten minutes
>>>>>> totalDur = 10 * 60
>>>>>>
>>>>>> main = dac $ takeSnd totalDur $ tabla + mul 0.5 tanpura
>>>>>> where
>>>>>> tabla    = loopSnd "tanpura - f - sp.mp3"
>>>>>> tanpura  = loopSndBy 8 "Teentaal.wav"
>>>>>> ~~~
>>>>>>
>>>>>> ~~~
>>>>>> -- to read file in loop
>>>>>> loopSnd :: String -> (Sig, Sig)
>>>>>>
>>>>>> -- to read file in loop with given period
>>>>>> loopSndBy :: D -> String -> (Sig, Sig)
>>>>>>
>>>>>> -- to take only given amount of seconds from file
>>>>>> takeSnd :: Sigs a => Double -> a -> a
>>>>>>
>>>>>> -- to scale signals with the given signal
>>>>>> mul :: SigSpace a => Sig -> a -> a
>>>>>> ~~~
>>>>>>
>>>>>> D is a Double inside dsl, Sigs is a type class for tpules of
> signals.
>>>>>> There are functions to read wav-files with the given speed.
>>>>>> Here is how we can listen to the file in reverse in the terminal:
>>>>>>
>>>>>> ~~~
>>>>>> ghci
>>>>>>> :m +Csound.Base
>>>>>>> readWav (-1) "fuzzy-buzzy-sound.wav"
>>>>>> ~~~
>>>>>>
>>>>>> The functions `readWav` and `loopWav` take a speed
>>>>>> of playback as first argument (and it's signal. We can change
>>>>>> it over time)
>>>>>>
>>>>>> ~~~
>>>>>> readWav :: Sig -> String -> (Sig, Sig)
>>>>>> loopWav :: Sig -> String -> (Sig, Sig)
>>>>>> ~~~
>>>>>>
>>>>>> You can look at all new functions at
>>>>>>
>>>>>>
> https://hackage.haskell.org/package/csound-expression-3.2.3/docs/Csound-Air.html#g:13
>>>>>> Sorry for skipping the docs. I hope that description above helps
>>> somehow.
>>>>>> I''m going to fix it soon.
>>>>>>
>>>>>> [1]https://hackage.haskell.org/package/csound-expression-3.2.3
>>>>>>
>>>>>>
>>>>>> Cheers
>>>>>> Anton
>>>>>>
>>>>> --
>>>>>
>>>>> Read the whole topic here: Haskell Art:
>>>>> http://lurk.org/r/topic/1LjVC2esBoyvTI5wy6etKT
>>>>>
>>>>> To leave Haskell Art, emailhaskell-...@group.lurk.org  with the
>>> following
>>>>> email subject: unsubscribe
>>>>>
>>> --
>>>
>>> Read the whole topic here: Haskell Art:
>>> http://lurk.org/r/topic/7BRSvu88fS55f1gDWxCc0x
>>>
>>> To leave Haskell Art, emailhaskell-...@group.lurk.org  with the
> following
>>> email subject: unsubscribe
>>>
>> --
>>
>> Read the whole topic here: Haskell Art:
>> http://lurk.org/r/topic/4c5MI0ikR08Yxg2oPjXDZg
>>
>> To leave Haskell Art, emailhaskell-...@group.lurk.org  with the following
> email subject: unsubscribe
>


-- 

Read the whole topic here: Haskell Art:
http://lurk.org/r/topic/1G4Sh6UVRDYSMOmC839sz7

To leave Haskell Art, email haskell-...@group.lurk.org with the following email 
subject: unsubscribe

Reply via email to