It is currently Tue Oct 17, 2017 8:18 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: still about gbbasic
PostPosted: Sat Mar 13, 2010 12:44 am 
Offline

Joined: Sun Mar 07, 2010 7:15 am
Posts: 45
Location: Kitee, North Karelia, Finland
Hi all,

Is there anyone interested to make one or two changes/additions to GBBASIC (a BASIC interpreter that runs in GB) ?

I'm a composer and I would like to use Gameboy as a sound source with different chamber ensembles (music is very experimental, atonal, but not necessarily rhythmically complex). Anyway, Shiny made wonderful job by changing GBBC (a converter which makes possible to write Basic stuff on desktop and then convert it to GBBASIC format). What I would need is two things, a possibility to change duty cycle and adding a second voice (I don't think that GBBASIC is fast enough for more than two voices). The SOUND is now in format:

SOUND x, y

where x is frequency and y is duration, if it could be changed something like:

SOUND ch, x, y, d

where ch is channel and d is duty cycle (0%,25%,50%,75%, simply 0-3).
Simpler solution would be if someone could give me hints how to open/use second voice by POKE directly to memory addresses.

Any hints, solutions etc are most welcome and greatly appreciated,
the original package can be downloaded from here:

gbb210.zip



Thanks for advance !

-jp


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 13, 2010 2:36 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
If you want to make sounds on the GB why don't you use something made for that, like MuddyGB, nanoloop or LSDj?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 13, 2010 2:51 am 
Offline

Joined: Sun Mar 07, 2010 7:15 am
Posts: 45
Location: Kitee, North Karelia, Finland
Hi mic_,

These softwares you mentioned are excellent, but I write algorithmic music, meaning I write (simple) programs which usually makes complex things. Although I've written those programs over 20 years, I'm not a good programmer (not a good composer either although my works are performed here and there quite often) and not able to change the ASM code (I've already tried). Good programs, all three, I've tried them but none of them are possible to make things I need to do, they are meant for different music and especially nanoloop and LDSj works perfectly for that purpose.

Thanks of your interest !

-jp

mic_ wrote:
If you want to make sounds on the GB why don't you use something made for that, like MuddyGB, nanoloop or LSDj?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 13, 2010 3:30 am 
Offline

Joined: Sun Mar 07, 2010 7:15 am
Posts: 45
Location: Kitee, North Karelia, Finland
Although there's a "risk" :) that if someone is interested to help me here, after hearing my music he will lost his/her interest, I still take my risk and put here a short example of my music. The composition is short, a little bit longer than a minute, it is scored for flute, celesta, harp and cello. Gameboy is intended to be independent part of the ensemble, the program making sounds would be written by GBBASIC, a new program for each composition, as I usually work, there's an element of chance everywhere here and writing the program just before performance adds a new dimension for this.

Hope you do not suffer too much :) !

jp

fragment #1 for flute, celesta, harp and cello



mic_ wrote:
If you want to make sounds on the GB why don't you use something made for that, like MuddyGB, nanoloop or LSDj?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 14, 2010 7:07 pm 
Offline

Joined: Wed Mar 10, 2010 8:43 am
Posts: 4
I've never worked with the GameBoy's sound hardware, but adding this feature seems easy enough. There's a standard function to read an expression, which greatly simplifies things. It's all just a matter of adding two more, and then acting on them... but it's never that simple.

One issue is that GBBASIC enables the sound hardware only for the brief period of time that the 'SOUND' function is being executed, which is a very bad thing if you plan to use this for music (commenting out a few lines should fix this). More problematic is that it's a blocking command that waits until the sound is finished before continuing, but that could be fixed somewhat easily as well.

Mostly, I have doubts because GBBASIC lacks precise timing facilities, something which I assume is necessary for any composition. That isn't quite as easy.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 14, 2010 10:57 pm 
Offline

Joined: Sun Mar 07, 2010 7:15 am
Posts: 45
Location: Kitee, North Karelia, Finland
Hi Shiny_,

I don't know ASM well, just basics, but adding this feature didn't look very complex operation, relieving to hear that it is true. There's no worry about timing, I don't know how it is done in current version but it works well, in this case GB "plays" with human performers and they are never as accurate as computer, so the current timing system is adequate enough.

Here's a technical document of sound (too):

GB programming info


Thanks of your comments Shiny_ !


-jp


Shiny_ wrote:
I've never worked with the GameBoy's sound hardware, but adding this feature seems easy enough. There's a standard function to read an expression, which greatly simplifies things. It's all just a matter of adding two more, and then acting on them... but it's never that simple.

One issue is that GBBASIC enables the sound hardware only for the brief period of time that the 'SOUND' function is being executed, which is a very bad thing if you plan to use this for music (commenting out a few lines should fix this). More problematic is that it's a blocking command that waits until the sound is finished before continuing, but that could be fixed somewhat easily as well.

Mostly, I have doubts because GBBASIC lacks precise timing facilities, something which I assume is necessary for any composition. That isn't quite as easy.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 16, 2010 1:16 pm 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
A better GB sound document


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 17, 2010 11:29 am 
Offline

Joined: Wed Apr 05, 2006 10:12 am
Posts: 126
Location: PA, USA
An even better sound doc, by blargg (and wikified):
http://gbdev.gg8.se/wiki/articles/Gameb ... d_hardware

And my old (somewhat obsolete but largely relevant) sound doc (it has a bunch of errors in it; if blargg's doc above counterindicates my doc on any fact, use blargg's doc):
http://web.archive.org/web/200803130253 ... BSOUND.txt

LN

_________________
"When life gives you zombies... *CHA-CHIK!* ...you make zombie-ade!"


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group