octal-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: updated sawgen.c


From: David O'Toole
Subject: Re: updated sawgen.c
Date: Sat Mar 10 20:09:01 2001

This email was written while listening to old Nick Drake records

> I found the problem with resetting the phase in sawgen.c - 'phase' was
> not initialized to 0.0 in ox_create().  I fixed that and also changed
> the type of phase and phaseinc to float, since it doesn't really make
> sense to me to call them freq values (although freq == float anyway..

Oh, yeah. It's probably only a good idea to use those typedefs when
communicating with Octal... for your own variables, you can use
float/double as you please. 

> :).  The comments and almost everything else in the file are unchanged
> from squaregen.c.  It might be good to incorporate the fix into
> squaregen.c, too.

I'm going to rewrite squaregen.c totally anyway, so I will remember to
do that. 

> I haven't read the docs thoroughly yet, but it seems to me that there
> ought to be a floating point control signal type.  It would make sense
> for things like LFOs and envelope generators which would send values
> generally in the range -1.0 to 1.0 as amplitude multipliers.  Or maybe

Wow, you're psychic :-). Yeah, I've been thinking about the
disadvantages of all-integer parameters. Having to scale them around,
etc. So I am going to make it selectable. It's actually very easy---the
idea is that the "param" data type now becomes "float". The OX_FORMAT
type selects the parameter's appearance, which, now, will also specify
whether it's floating point or integer. You'll still recieve all
floating point values when you get an event in OX_UPDATE---- just cast
the value to an integer before using it, if that's what you want. The
floats will be happy to store integers for awhile (GtkAdjustment
controls already do.) 

I actually tried compiling this way. It breaks any switch-statements,
but that is trivial to fix. Basically the fact that a parameter is
integer will affect only display and control elements. That way we can
still have the tracker-like event list editor displaying things in a
more editable format than decimal floating point. The ox_desc feedback
should still work fine as well. 

These are probably the last little cleanups in the Octal API... we might
as well make them now when there are few machines. Better than making
them later on when the software (i hope) actually has users :-). 

> By the way, I'm having some problems building the docs - running latex
> on ox_api_reference.tex gives
> 
> ! Undefined control sequence.

Those are just chapter files---try running latex on ox_api_main.tex
(like the makefile does.) 


-- 
@@@ david o'toole
@@@ address@hidden
@@@ www.gnu.org/software/octal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]