Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411372 Posts in 69353 Topics- by 58405 Members - Latest Member: mazda911

April 13, 2024, 04:21:14 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
  Show Posts
Pages: 1 ... 8 9 [10] 11 12 ... 82
181  Developer / Technical / Re: Why did I ever use game maker? Oh... Why? on: April 08, 2010, 10:00:30 AM
If I understand the discussion right, what GML does is basically dynamic scoping, which used to be popular in very early programming languages but fell out of grace shortly after ALGOL introduced lexical scoping in, oh, the mid-1950s or so. In Common Lisp you can still have it if you want, but you have to explicitly ask for it. Apart from that, not many languages support that nowadays because it's generally agreed that the "other" way (lexical scope) is way better.
182  Community / Townhall / Re: Cosyne Synthesis Engine on: April 08, 2010, 08:12:46 AM
A small description of each interface function could also help a little maybe, to make it easier to get started, although all is quite self explanatory...

Yup, it's on my mental todo list Wink

Quote
The only thing I didn't get somehow was how the velocity parameter of Cosyne_PlayNote() really affects the instrument... Is it clamped to [0,255] or only 127?

Range 0..127, for compatibility with MIDI where it's the same. Right now this just linearly scales the gain of the instrument, but I might think of something more physical here...

Quote
Also I thought, maybe it would be good to add it the same way to the instrument description language as LFOs and parameters can be used in expressions, by using a symbol like 'vel' or something, so that one could do thing like 'shape({ 0.1+vel*0.8 })'? As float parameter in that case... Just an idea though.

That's already possible! It's not yet in the docs though. Use the variable f for frequency and v for velocity. f is in Hz, v should already be scaled to 0..1.
183  Developer / Technical / Re: Level-Editor Needed(eventually) on: April 06, 2010, 03:15:01 PM
While we're talking about binary file formats (or why not to use them), here's an amusing article by Walter Bright on cowboying your way to really fast and simple binary (de-)serialization via pointer dehydration: http://www.artima.com/cppsource/backyard.html

Of course I cannot condone such practices. Well, hello there!
184  Community / Townhall / Re: Cosyne Synthesis Engine on: April 06, 2010, 02:56:46 PM
Ok, Cosyne v0.2 is out. We now have user parameters as suggested by 0rel, and CosPlay can modulate them with the mouse if you pass it the -m switch. There are some other minor changes, mostly better error reporting.

Also, the first draft of the synth language docs is now more or less complete.
185  Developer / Technical / Re: File Hosting? on: April 06, 2010, 07:55:18 AM
I used box.net to good effect in the past. Though for my recent releases, I'm using the download section of the workspace at bitbucket.org... don't know where all the fear of releasing source comes from. It's not like anyone is going to steal it and get rich off it.
186  Community / Townhall / Re: Cosyne Synthesis Engine on: April 05, 2010, 11:47:48 PM
Thanks, some interesting points there. I'm at work now and will reply in more depth later. Just wanted to point out that I've done some documentation on the synth language. It's not complete yet, but should give people a start.

Tonight I'll probably do a new release with parameter changes implemented and some other smaller fixes.
187  Developer / Technical / Re: Why did I ever use game maker? Oh... Why? on: April 05, 2010, 10:47:05 AM
Since this is such a lame hate thread, and I can't seem to spot this bug, is it possible that anyone else has managed to?  Shrug

It's hard for me to read the code since I don't know GM, but I guess this is the main loop going through the inventory items?

Code:
        for(i = scroll+1; i != 30; i += 1) {

Do you ever check if you have reached the end of the inventory?
188  Developer / Technical / Re: Why did I ever use game maker? Oh... Why? on: April 05, 2010, 02:20:23 AM
Welcome to the world of debugging. This will happen to you no matter the choice of language as soon as you start writing nontrivial code.

I guess Game Maker doesn't come with a built-in debugger, huh? Barring that, does it at least offer a way to write text output to some console? If so, start sprinkling little diagnostic messages throughout your code, especially in your loop bodies, to figure out what's going wrong.

Besides, you should definitely comment your code so that you still understand it when you return to it in a few weeks' time. Also consider using more descriptive variable names.
189  Developer / Technical / Re: The grumpy old programmer room on: April 03, 2010, 06:23:32 PM
This article gives a very detailed rationale on why export wasn't a good idea. Herb Sutter also sums up the situation here. In short, it's insanely hard to implement and is almost useless in practice. Even EDG, the only guys who ever implemented the cursed thing and spent several man-years on it, recommended dumping it. I think the committee did the right thing this time.
190  Community / Townhall / Re: Cosyne Synthesis Engine on: April 03, 2010, 02:21:57 AM
The name is just mind-blowing.  Epileptic

Heh. It must have been a rare flash of inspiration Wink
191  Community / Townhall / Re: Cosyne Synthesis Engine on: April 03, 2010, 02:19:54 AM
This is neat!  Light a lightweight version of supercollider.

Would be cool to link to as a library, but I won't be able to do that unless there's a mac port done.

Yeah, sorry about that. There's nothing really platform-specific about it, so a port shouldn't even be hard to do, I just don't have access to a Mac Sad

Quote
A direct 'output to wave' function would be cool - with that, I can imagine myself making plenty use of this for messing around/improvising.
What are you referring to? The library itself is totally backend-agnostic, it just generates samples, what you do with them is up to you. For convenience, a simple SDL backend is provided. The CosPlay app actually has a command line switch to record to a wav file. Or maybe you were referring to 0rel's thing.
192  Community / Townhall / Re: Cosyne Synthesis Engine on: April 03, 2010, 01:59:38 AM
Ok, finally have some time. First of all, thanks for all the nice welcome-backs and such, it's appreciated Smiley

Some documentation would help though.
Yes, I should get to that ASAP.

Quote
* Realtime control over parameters of the sound, like. (ChangeParameter(instrument,...) or something similar.)
Yes, I've definitely thought about something like this, and it shouldn't be hard to implement. I guess I'll do this soon.

Quote
* More than 2 oscillators per instrument?
Would certainly be attractive. So far, I stuck to only 2 for several reasons. First of all, the plan was to keep synthesis cheap enough to run in the background of a game which does a fair amount of processing itself. Besides, the 2 oscillators plus filter layout is sort of a classic design of (soft)synths, so it's immediately familiar to anyone who has done some synth programming. (In fact, if you know the synth1 VST, I've copied a lot of its layout.) Finally, having a variable number of oscillators would probably necessitate a more modular design which could complicate things, both internally and for the user. On the other hand, just adding an optional third oscillator which gets mixed in with the others would be more or less a triviality to add, so that's definitely an option if people want it.

Quote
* Polyphonic instruments? (PlayChord(...) or something similar... Multiple PlayNote()s with the same start time? Didn't try that yet...)
Yep, multiple PlayNote()s do work. Just watch the volume so that you don't get clipping. I'm not sure yet how to deal with this whole volume business properly. Anyway, you can try it in the CosPlay sample application, just hit several keys at once.

Quote
And to get the library working in C++, I had to change those macros in the cosyne.h file like this:
Ah, thanks for this, forgot to try it in C++. Will update the header file accordingly.


Quote
Still I'm not so sure if I used the right method to play notes interactively, after pressing a button. I tried it like this:

Code:
Cosyne_PlayNote( c, Cosyne_GetCurrentTime( c ), 20000, INSTR_XYZ, 40, 0x40 );

That worked for me, although the timing is a bit off that way, because OpenAL (and other Audio APIs too) only asks for buffer updates in certain intervals, so that PlayNote() events are only as accurate as the buffer size allows... But it doesn't sound so bad, and adds some "analog qualities" to it Wink.

(Probably there's a way around this though, by adding an offset manually, but I didn't try that yet... Instead of a buffer based render function, a sample based render function could also help with this maybe, although that would make the performance go down...)

The way you tried was fine. (As a shorthand, you can use -1 instead of GetCurrentTime(), or maybe 0xFFFFFFFF if the compiler complains about signed-unsigned mismatch.)

Cosyne internally works with chunks of 64 samples instead of processing each sample individually to keep the CPU load manageable. If each chunk could be output immediately without delay, at a sample rate of 44.1kHz, this would correspond to a latency of 64/44100 = 1.45ms, which is basically realtime as far as humans are concerned. So this design shouldn't be a problem.

The problem is how to get the data to your soundcard as quickly as possible. As you mentioned, all audio APIs have some kind of cyclic buffer for audio data. The key point is the size of this buffer, which the API should let you choose upon initialization. If it's too large, you will get bad latency, if it's too small, audio will crackle and skip. This is to some degree hardware dependent, so I guess you should offer it as an option to your user, but in general I've found that 512 samples is an acceptable compromise.

Keep in mind that a game running at 60fps corresponds to having 735 samples per frame (at 44.1khz), so a 512 samples buffer should be just fine to keep perfect sync with the video.

Quote
By the way, I had an idea about MML (http://en.wikipedia.org/wiki/Music_Macro_Language), which found out about there a while ago... That's some crazy stuff for sure, and maybe the way it handles sequencing could be useful here too. I don't really understand how all this MML stuff works though, but it seems to be very powerful.. Maybe a separate library for sequencing only could be an other "module" of this toolkit, just an idea I had... Something like macros (for example for defining things like an arpeggiator, scales and rhythms), could be defined in seperate small scripts, which are generating note/parameter events, passing over to cosyne. Some parameters could be controlled interactively... It's a quite cloudy idea though... Don't now how it could be implemented myself Wink
Yes, that's very interesting stuff. I also did some stuff with procedural composition in Python a while back which I could now hook up to Cosyne (maybe you can still find the thread here). In general, I think these sorts of things should be implemented on top of Cosyne, not within it: I've decided to keep the engine closely focused on efficient generation of audio data. This is why the score functionality is so rudimentary and doesn't even offer something like a beats per minute setting, just raw sample counts. (Though maybe seconds would be nicer.)

Quote
I'd just love to edit instruments and possibly even "interactive sequences", while the final program keeps running... However, that's probably quite difficult with text based code files.
A very nice thought, and I think not even that hard to implement. Just check if the file has been modified (usually the OS will give you some kind of hook to listen for this, Windows does at least), and if so, reload it.

Quote
I also tried my hands on making a audio synth library (called 'executable sound'), you might remember it... It's still not fully finished though, but I'm working on it again soon. Mine isn't so "score" oriented, and it's harder to play notes and to define separate instruments the easily... And it can't be used in pure code/text, which makes things more difficult in practice.
Yes, I remember it, it was included with that 3D flying game of yours, right? (Occuplector or something like that, IIRC.) It was very cool, though it took a long while to render. Would definitely love to see any progress on that.

Quote
- This is one point that is really cool about your library. It's easy to make the most obvious thing: Play a note with an instrument! That's really useful.
Yes, ease of use (and binding to other languages) was a goal with this.
193  Community / Townhall / Re: Cosyne Synthesis Engine on: April 02, 2010, 06:16:13 AM
0rel, that's really neat, just the kind of thing I imagined people could do with it! Glad to see some people are interested in this. I just came back from a week in Berlin, so had no time to work on it, but as soon as I have some free time I'll attend to some of the issues raised here.
194  Community / Townhall / Re: Cosyne Synthesis Engine on: March 24, 2010, 12:53:56 AM
hmm ill see if i can get a os x binary up and running

That would be too cool... do you have a D environment set up? I used DMD 1 with Tango. Let me know if I can help. The main issue is I don't know if DMD can build shared libraries on OS X. To get started, try the CosPlay demo application which doesn't do dynamic linking, it just compiles the library in.

Also I should mention the Bitbucket hg repository is a few commits behind my actual working directory because I had some trouble pushing to it last night. I hope this will be fixed soon.
195  Community / Townhall / Cosyne Synthesis Engine on: March 23, 2010, 05:13:01 PM
Hey people,

I haven't been around these parts much lately for various reasons; maybe some people remember me anyway. However I've been working on something that may be of interest to those wanting to make a music or rhythm game, namely a lightweight realtime software synthesizer which can be integrated as a library. The thing is called Cosyne for the Cosyne Synthesis Engine (yeah, recursive acronyms rock). Instruments for the synth can be programmed in a special synth description language (documentation).

In this very first release, there's a demo application which lets you play with various synthesizers using your computer keyboard, and there are bindings to C and Python as well as some very basic example programs making use of those.

Download for Windows (check the readme):
http://bitbucket.org/eriatarka/cosyne/downloads/cosyne-bin-0.1.zip obsolete

Project homepage (source etc):
http://bitbucket.org/eriatarka/cosyne/wiki/Home

Some audio samples (this is only scratching the surface...):
http://www.box.net/shared/cflgzj8d26

I don't know if there's any interest for this kind of thing at all, so I'm just putting this out there to see what people think.

BTW, it's written in D.


=== UPDATE ===

The latest version of Cosyne can be obtained by going to the Downloads page and grabbing the newest binary package.
196  Community / Jams & Events / Re: BIGJam: The Games (and music) on: August 05, 2009, 01:16:16 PM
Thanks man Smiley
197  Developer / Playtesting / Re: Peristalsis on: August 05, 2009, 12:53:29 PM
Ah, okay. May just be a case of the hardware (video card or monitor) not supporting that resolution. But yeah, only tested on Windows obviously.

EDIT: And welcome back to the forums, Stephen Smiley
198  Community / Jams & Events / Re: BIGJam 2009 photos on: August 05, 2009, 12:50:52 PM

Oh yeah. That's me in all my glory all right. Thanks man.





Right. That's the one where everyone thought they were being photographed, so everyone's holding still :D
199  Community / Jams & Events / Re: BIGJam: The Games (and music) on: August 05, 2009, 12:45:12 PM
Little physics toy for the "communist bull rage" themed 3h jam:

Download for Windows (no idea if this works, never exported a Construct game before)
It's a one button game (though I only thought of this after the jam), hold Space to ascend, release Space to thrust forward. Make it to the, erm, Red Square. How fast can you go?
It's also a commentary on how real-world communism stomped all over the socialist ideas of Marx and Engels. Except it's not.


Did Peristalsis with increpare:



Also did something for the Reality TV jam with György (me doing graphics and music/sound, it was oddly fun), but he's still working on it I think, so I'm not posting it at the moment.


overdrive for the 1 hour music thing. I actually feel okay about this one, except that some transitions would have needed some more smoothing out. But I like it overall.
200  Community / Jams & Events / Re: BIGJam 2009 photos on: August 05, 2009, 01:29:37 AM
I can't find myself on any of those Cry

Serves me right for skipping the first two days I guess.
Pages: 1 ... 8 9 [10] 11 12 ... 82
Theme orange-lt created by panic