Copperbox revision 2479.
I've added some more opcodes to Core - the physical model of vibes and others. This is so I've some default instruments to use for building the higher-level layers.
Also I've added OnsetNotelist to Basic. This is a note list for instruments without dynamic prolongation like vibes, each note has the same duration but the onsets can start with different advances.
Wednesday, June 29, 2011
zsnd-core
Copperbox revision 2477.
I've added pseudo-opcodes for assignment, these produce assignment statements in the generated Csound code, but are treated exactly like declarations in ZSnd (so the Click language can schedule them when all ports are saturated).
I've added pseudo-opcodes for assignment, these produce assignment statements in the generated Csound code, but are treated exactly like declarations in ZSnd (so the Click language can schedule them when all ports are saturated).
Tuesday, June 28, 2011
Monday, June 27, 2011
zsnd-core
Copperbox revision 2472.
I've replaced the old implementation of Click with the code from ClickNew and deleted ClickNew. The helpers that were in the working example NewPortSpec have been put into their own modules.
Note - there is still a lot of code to move over to the new Click implementation - the monadic layer which allows Inst definitions to be built with the do-notation and all the opcodes.
I've replaced the old implementation of Click with the code from ClickNew and deleted ClickNew. The helpers that were in the working example NewPortSpec have been put into their own modules.
Note - there is still a lot of code to move over to the new Click implementation - the monadic layer which allows Inst definitions to be built with the do-notation and all the opcodes.
Sunday, June 26, 2011
zsnd-core
Copperbox revision 2470.
I've added a new version of Click that builds the result Csound instrument from a dependency graph rather than generating 1-1 a statement for each declaration (regardless of whether the declaration is used).
The new Click code is unfinished - port assignment doesn't work.
I've added a new version of Click that builds the result Csound instrument from a dependency graph rather than generating 1-1 a statement for each declaration (regardless of whether the declaration is used).
The new Click code is unfinished - port assignment doesn't work.
Saturday, June 25, 2011
zsnd-core
Copperbox revision 2469.
I've added local variable declarations to the Click Inst definitions. I haven't tested them yet to see if the make complex instrument definitions easier. Hopefully global variables should follow the pattern used for local variables when I come to add them.
I've added local variable declarations to the Click Inst definitions. I haven't tested them yet to see if the make complex instrument definitions easier. Hopefully global variables should follow the pattern used for local variables when I come to add them.
zsnd-core
Copperbox revision 2468.
Work tidying up the Inst code.
I'm looking towards adding variables into the Inst definition - translating the Xanadu instrument without them was too difficult. But, I'm not sure where variables should fit in the syntax, so I've tidied up the code and removed some out-of-date comments first.
Work tidying up the Inst code.
I'm looking towards adding variables into the Inst definition - translating the Xanadu instrument without them was too difficult. But, I'm not sure where variables should fit in the syntax, so I've tidied up the code and removed some out-of-date comments first.
Friday, June 24, 2011
Thursday, June 23, 2011
zsnd-core
Copperbox revision 2463.
The previous translation from Click to Inst definition had severe problems that I didn't spot whilst coding it. I've replaced it wholesale with a new translation scheme. Note, in the new version there is a bug with embedded ports where the port is within a larger expression that needs to be ironed out.
The previous translation from Click to Inst definition had severe problems that I didn't spot whilst coding it. I've replaced it wholesale with a new translation scheme. Note, in the new version there is a bug with embedded ports where the port is within a larger expression that needs to be ironed out.
Wednesday, June 22, 2011
zsnd-core
Copperbox revision 2461.
I've worked up the translation from Click style definitions to Csound instruments so that is accurate - opcode invocations are in the right place and only one is generated.
Ports still need to be handled, so I cannot generate working instrument definitions just yet.
I've worked up the translation from Click style definitions to Csound instruments so that is accurate - opcode invocations are in the right place and only one is generated.
Ports still need to be handled, so I cannot generate working instrument definitions just yet.
Tuesday, June 21, 2011
zsnd-core
Copperbox revision 2460.
Initial work on building instruments with syntax patterned after the Click modular router configuration language, rather than using do notation syntax. This might lead to more manageable instrument definitions.
There is a lot of work to do as I haven't worked out the details of the translation scheme or how to represent Ports in the Click language.
Initial work on building instruments with syntax patterned after the Click modular router configuration language, rather than using do notation syntax. This might lead to more manageable instrument definitions.
There is a lot of work to do as I haven't worked out the details of the translation scheme or how to represent Ports in the Click language.
Sunday, June 19, 2011
zsnd-basic
Copperbox revision 2458.
I've changed the context so there is a concrete system context for tempo and a parametric user context for instrument specific parameters. The system context will be extended with the staccato_factor from the AdvNotelist.
Update - revision 2459. AdvNotelist now uses staccato_factor from the system context.
I've changed the context so there is a concrete system context for tempo and a parametric user context for instrument specific parameters. The system context will be extended with the staccato_factor from the AdvNotelist.
Update - revision 2459. AdvNotelist now uses staccato_factor from the system context.
zsnd-basic
Copperbox revision 2457.
Work extending the AdvNotelist - I've added a transformer version and made the interface more comparable to the Notelist monad.
Work extending the AdvNotelist - I've added a transformer version and made the interface more comparable to the Notelist monad.
zsnd-basic
Copperbox revision 2456.
I've added a new notelist object based on concatenation rather than time-line positioning.
I've added a new notelist object based on concatenation rather than time-line positioning.
Saturday, June 18, 2011
Thursday, June 16, 2011
zsnd-core
Copperbox revision 2454.
Some work tidying the Inst code. I can encode yesterdays experiment with the Inst builder as it is, but I'm still not really satisfied with way of defining instruments. I've been working with a CPS implementation but so far the results aren't especially promising.
Some work tidying the Inst code. I can encode yesterdays experiment with the Inst builder as it is, but I'm still not really satisfied with way of defining instruments. I've been working with a CPS implementation but so far the results aren't especially promising.
Wednesday, June 15, 2011
zsnd-core
Copperbox revision 2453.
I've added an experiment in designing a new notation for instruments. Rather than define a instrument as a graph within the do-notation, I'm trying to get a more linear definition similar to ChucK. Graph definitions don't really seem composable, whereas a linear definition might be more promising - in Haskell, Lava seems to be an obvious precedent.
I've added an experiment in designing a new notation for instruments. Rather than define a instrument as a graph within the do-notation, I'm trying to get a more linear definition similar to ChucK. Graph definitions don't really seem composable, whereas a linear definition might be more promising - in Haskell, Lava seems to be an obvious precedent.
Tuesday, June 14, 2011
Sunday, June 12, 2011
zsnd-basic
Copperbox revision 2451.
I've reworked the Score datatype - it now supports composition (overlay, concatenation).
I've reworked the Score datatype - it now supports composition (overlay, concatenation).
zsnd-basic
Copperbox revision 2450.
I've added new modules PosEvent, which is PosObject in Wumpus, and Concat. It looks like the current Score datatype will need a rework as currently it is incompatible with the concat type classes.
I've added new modules PosEvent, which is PosObject in Wumpus, and Concat. It looks like the current Score datatype will need a rework as currently it is incompatible with the concat type classes.
Saturday, June 11, 2011
zsnd-basic
Copperbox revision 2449.
I've added some more of the Wumpus objects - AdvObject, Connector, TraceLoc - and a symbolic pitch type.
I'm not sure whether AdvObject with have a reasonable use-cases for modelling events. Connector might be interesting though - it seems like it could be used for interpolations. TraceLoc might actually be more idiomatic for modelling note lists than TraceNotelist.
I've added some more of the Wumpus objects - AdvObject, Connector, TraceLoc - and a symbolic pitch type.
I'm not sure whether AdvObject with have a reasonable use-cases for modelling events. Connector might be interesting though - it seems like it could be used for interpolations. TraceLoc might actually be more idiomatic for modelling note lists than TraceNotelist.
Friday, June 10, 2011
zsnd-basic
Copperbox revision 2448.
I've added a module of gen routines - these are the same as the gen routines in ZSnd-Core, but they are lifted to LocEvent so they can be used in the TraceNotelist monad. With this in place, I can now generate scores in the high level language.
I've added a module of gen routines - these are the same as the gen routines in ZSnd-Core, but they are lifted to LocEvent so they can be used in the TraceNotelist monad. With this in place, I can now generate scores in the high level language.
zsnd-basic
Copperbox revision 2447.
I've added the TraceNotelist module which is analogue to TraceDrawing in Wumpus-Basic. This provides the Notelist monad - the main monad to build note lists with.
I've added the TraceNotelist module which is analogue to TraceDrawing in Wumpus-Basic. This provides the Notelist monad - the main monad to build note lists with.
Thursday, June 9, 2011
zsnd-basic
Copperbox revision 2446.
I've started a new project zsnd-basic, building a higher level layer on top of zsnd-core. Unlike ZMidi, there is a much better analogue to Wumpus-Basic. The major difference is that there isn't a unified context, cf. the DrawingContext in Wumpus-Basic - instruments are expected to have their own context.
I've started a new project zsnd-basic, building a higher level layer on top of zsnd-core. Unlike ZMidi, there is a much better analogue to Wumpus-Basic. The major difference is that there isn't a unified context, cf. the DrawingContext in Wumpus-Basic - instruments are expected to have their own context.
Wednesday, June 8, 2011
zsnd-core
Copperbox revision 2445.
Various updates to the Inst / orchestra code. I've recreated a more substantial example from the Csound demos (the Zanadu FM synthesizer) which revealed some problems. Some I've fixed - allowing the int pretty printer to print negative numbers and printing floats in decimal notation, but others are more pernicious. As a quick work around I've added a parens combinator to draw parens in the output code. This could be achieved with a proper unparser for arithmetic expressions that adds parens automatically, but I'm not minded to write one at the moment. The other problem is I seem need transparent casts in the Haskell code:
I think it will be a good idea to allow instrument definitions in native Csound to be combined with scores in Haskell. Whilst embedding the instrument language in Haskell was an interesting technical challenge, instruments are generally going to be easier to define with Csound rather than Haskell.
Various updates to the Inst / orchestra code. I've recreated a more substantial example from the Csound demos (the Zanadu FM synthesizer) which revealed some problems. Some I've fixed - allowing the int pretty printer to print negative numbers and printing floats in decimal notation, but others are more pernicious. As a quick work around I've added a parens combinator to draw parens in the output code. This could be achieved with a proper unparser for arithmetic expressions that adds parens automatically, but I'm not minded to write one at the moment. The other problem is I seem need transparent casts in the Haskell code:
inst3 :: Inst inst3 = runInstBuilder 3 $ do ishift <- ivar 0.00666667 ipch <- ivar (cpspch $ pfield 5) ioct <- ivar (octpch $ pfield 5) (kadsr::Kr) <- linseg 0 (pfield 3 / 3) 1.0 [ ((pfield 3 / 3), 1.0), ((pfield 3 / 3), 0)] (kmodi::Kr) <- linseg 0 (pfield 3 / 3) 5 [ ((pfield 3 / 3), 3), ((pfield 3 / 3), 0)] (kmodr::Kr) <- linseg (pfield 6) (pfield 3) (pfield 7) [] a1 <- avar $ castAR $ kmodi*(parens ((kmodr-1)/kmodr))/2 a1ndx <- avar $ abs ((a1 * 2) / 20) a2 <- avar $ castAR $ kmodi*(parens ((kmodr+1)/kmodr))/2 a3 <- tablei_ a1ndx 3 1 0 0 (ao1::Ar) <- oscil a1 ipch 2 a4 <- avar $ exp((-0.5) * a3 + ao1) ao2 <- oscil (a2 * castAR ipch) ipch 2 (aoutl::Ar) <- oscil (1000*(castAR kadsr)*a4) (ao2 + castAR (cpsoct(ioct+ishift))) 1 (aoutr::Ar) <- oscil (1000*(castAR kadsr)*a4) (ao2 + castAR (cpsoct(ioct-ishift))) 1 outs [aoutl, aoutr]
I think it will be a good idea to allow instrument definitions in native Csound to be combined with scores in Haskell. Whilst embedding the instrument language in Haskell was an interesting technical challenge, instruments are generally going to be easier to define with Csound rather than Haskell.
zsnd-core
Copperbox revisions 2443 and 2444.
I've added a module for the signal modifier opcodes (envelopes, delays etc.). I'd never noticed before that Csound has nullary opcodes, e.g. delayw, fortunately as opcodes are represented with a list of results, nullary opcodes are just the empty list.
I've added a module for the signal modifier opcodes (envelopes, delays etc.). I'd never noticed before that Csound has nullary opcodes, e.g. delayw, fortunately as opcodes are represented with a list of results, nullary opcodes are just the empty list.
Tuesday, June 7, 2011
zsnd-core
Copperbox revision 2442.
Now that I have a rate polymorphic opcode function, I've been able to replace the code duplication where I had to make a class for functions that could return either at AR (audio rate) or KR (control rate) but not IR (init rate).
Now that I have a rate polymorphic opcode function, I've been able to replace the code duplication where I had to make a class for functions that could return either at AR (audio rate) or KR (control rate) but not IR (init rate).
Monday, June 6, 2011
zsnd-core
Copperbox revision 2438.
More gen routines - I've now wrapped all the ones listed in the Csound book. One problem with the Csound book and manual is that they rarely mention whether arguments are integral or floating types - it's quite likely I've made a number of wrong guesses in the types of the Haskell wrapping functions.
More gen routines - I've now wrapped all the ones listed in the Csound book. One problem with the Csound book and manual is that they rarely mention whether arguments are integral or floating types - it's quite likely I've made a number of wrong guesses in the types of the Haskell wrapping functions.
Sunday, June 5, 2011
zscore - now zsnd-core
Copperbox revision 2436.
I've renamed ZScore, it is now ZSnd-Core. If the project grows, it is expected to follow the Wumpus pattern - Core for the code that directly generates output, Basic for a high level layer that is feasible to program with.
I've renamed ZScore, it is now ZSnd-Core. If the project grows, it is expected to follow the Wumpus pattern - Core for the code that directly generates output, Basic for a high level layer that is feasible to program with.
Saturday, June 4, 2011
zscore
Copperbox revision 2431.
I've added a module for opcodes. Plus I've decided to generate variable names rather than annotate them directly as Strings, the example from yesterday now becomes:
demo01 :: Doc
demo01 = format $ runInstBuilder 199 $ do
iamp <- ivar $ pfield 4
ifrq <- ivar $ cpspch (pfield 5)
a1 <- oscil iamp ifrq 1
out a1
I've added a module for opcodes. Plus I've decided to generate variable names rather than annotate them directly as Strings, the example from yesterday now becomes:
demo01 :: Doc
demo01 = format $ runInstBuilder 199 $ do
iamp <- ivar $ pfield 4
ifrq <- ivar $ cpspch (pfield 5)
a1 <- oscil iamp ifrq 1
out a1
Friday, June 3, 2011
zscore
Copperbox revision 2430.
I've started a new music experiment ZScore to generate Csound - I'll rename it soon as will have the capability to generate both score and orchestra files. Orchestra generation seems to work quite well in the do-notation, with one unfortunate exception - variable names can't be reified, so they must be duplicated as Strings:
demo01 :: Doc
demo01 = runInstBuilder 199 $ do
iamp <- var "iamp" $ pfield 4
ifrq <- var "ifrq" $ cpspch (pfield 5)
a1 <- oscil "a1" [iamp, ifrq, 1]
out a1
I've started a new music experiment ZScore to generate Csound - I'll rename it soon as will have the capability to generate both score and orchestra files. Orchestra generation seems to work quite well in the do-notation, with one unfortunate exception - variable names can't be reified, so they must be duplicated as Strings:
demo01 :: Doc
demo01 = runInstBuilder 199 $ do
iamp <- var "iamp" $ pfield 4
ifrq <- var "ifrq" $ cpspch (pfield 5)
a1 <- oscil "a1" [iamp, ifrq, 1]
out a1
Thursday, June 2, 2011
wumpus-tree
Copperbox revision 2429.
Some tidying up. I'm still not sure how I intended to handle references in Wumpus-Tree, so as a prelude I've tidied up some of rough edges in the code.
Some tidying up. I'm still not sure how I intended to handle references in Wumpus-Tree, so as a prelude I've tidied up some of rough edges in the code.
Wednesday, June 1, 2011
wumpus-tree
Copperbox revision 2428.
Initial work adding references to the intermediate tree. This work is intended to replace the current monadic tree building as do-notation is more a hindrance than help for building trees, but I've got a lot of details to work out.
Initial work adding references to the intermediate tree. This work is intended to replace the current monadic tree building as do-notation is more a hindrance than help for building trees, but I've got a lot of details to work out.
Subscribe to:
Posts (Atom)
Blog Archive
-
▼
2011
(650)
-
▼
June
(49)
- zsnd
- zsnd-core
- zsnd-core
- zsnd-core
- zsnd-core
- zsnd-core
- zsnd-core
- zsnd-core
- zsnd-core
- zsnd-core
- zsnd-core
- zsnd-core
- zsnd-core
- zsnd-core
- zsnd-core
- zsnd-core
- zsnd-core
- zsnd-core
- zsnd-core
- zsnd-basic
- zsnd-basic
- zsnd-basic
- zsnd
- zsnd-core
- zsnd-core
- zsnd
- zsnd-basic
- zsnd-basic
- zsnd-basic
- zsnd-basic
- zsnd-basic
- zsnd-basic
- zsnd-core
- zsnd-core
- zsnd-core
- zsnd-core
- zsnd-core
- zsnd-core
- zsnd-core
- zsnd-core
- zscore - now zsnd-core
- zscore
- zscore
- zscore
- zscore
- zscore
- zscore
- wumpus-tree
- wumpus-tree
-
▼
June
(49)
About Me
- Stephen Tetley
- Disambiguating biog as there are a few Stephen Tetley's in the world. I'm neither a cage fighter or yachtsman. I studied Fine Art in the nineties (foundation Bradford 1992, degree Cheltenham 1992 - 95) then Computing part-time at Leeds Met graduating in 2003. I'm the Stephen Tetley on Haskell Cafe and Stackoverflow.