![]() |
![]() |
#21 | |||
Wipe-Out Enthusiast
Join Date: Nov 2005
Location: .
Age: 43
Posts: 2,545
|
Quote:
Quote:
Quote:
Although i can now get-by without using MED, setting a decent set of commands up for it would be one job done that i could use again-and-again in the future. |
|||
![]() |
![]() |
#22 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Replay routines will set the volume registers regularly, and writing them never really worked with any replayer. I'll try poking that volume setting in the MED file later and see if perhaps that works.
|
![]() |
![]() |
#23 |
Wipe-Out Enthusiast
Join Date: Nov 2005
Location: .
Age: 43
Posts: 2,545
|
Not sure i understand this - how does it work on the MedPlayer and PTplayer commands i currently have set up in Blitz then? I am pretty sure they are not the h/w volume controls.
|
![]() |
![]() |
#24 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Replay routines should scale any value they use to set the hardware volume by a master volume. At least this is how Protracker and compatible replay routines do, and they work as expected.
Since there are effects and commands that alter the track volume (hardware volume), changing the hardware volume yourself will typically result in a flickering volume level. What do the BB MED volume commands sound like? |
![]() |
![]() |
#25 | |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Quote:
However, it does this from a set master value that it manipulates as part of the routines it has for fading music in / out at start / end of playback as required. I wonder if there's a similar "master volume" variable in the med replayer code? If you manipulate this variable from your code rather than the volume regs directly then the replayer should use this altered volume for it's own subsequent writes to the volume regs. That should solve the problem of the player overwriting the volumes you set in the hardware registers directly. |
|
![]() |
![]() |
#26 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
No master volume in the MED replayer, but it was just two lines of code to fix that.
I'll see if I can write it all up together a multi song selector later. Though I'm not keen on diving into the BB command extension mess, unless there's a really good guide somewhere? |
![]() |
![]() |
#27 | ||
Wipe-Out Enthusiast
Join Date: Nov 2005
Location: .
Age: 43
Posts: 2,545
|
Quote:
thanks for having a look ![]() Quote:
|
||
![]() |
![]() |
#28 |
Registered User
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 771
|
Here are my observations so far:
1. on the sample program Examples:amigamode/medplayer.bb, if the SetInt is changed from 5 to 3 there is a definite change in playback speed.Not to suggest it will fix problem but only other IRQ is available. 2. Downloaded a few other med to test and discovered if the first four bytes were "MMD3" a guru always ensued. The lambada.med begins with "MMD0" and plays ok. Would it be possible to post the actual med giving trouble or, if it's under wraps, something else that similarly misbehaves? |
![]() |
![]() |
#29 | |
Wipe-Out Enthusiast
Join Date: Nov 2005
Location: .
Age: 43
Posts: 2,545
|
Quote:
Indeed changing the interupt used does change the timing, but it's no timing for a musician. You'll notice lambada.med using the 'default' SPD (not BPM) values used in Octamed. I use in my tunes, often small loops that are heavily dependent on exact BPMs. These can still not be achieved correctly and with any degree of accuracy with a change of interupt to 3. The command is well-documented to be Vblank based, and this is why it operates fine using SPD timing in interupt 5 Both MMD0 and MMD1 formats work fine. MMD2 also crashes (suggesting med.library is not being used) whilst MMD3 does not even exist afaik! (certainly not in Soundstudio 1.03c) There are several MEDs i have giving the problem, and sorry, no i'm not willing to post them as they are going into projects i am currently working on. I am sure there must be plenty on aminet though which use BPM timing? |
|
![]() |
![]() |
#30 | |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,200
|
Quote:
I'd suggest using the medplayer.library for any 4-voice hardware-banging playback but keep in mind that the BPM is only accurate in Mix mode anyway I think (due to being called by a hook routine when the mix buffer needs to be recalculated for the next frame). |
|
![]() |
![]() |
#31 | |
Wipe-Out Enthusiast
Join Date: Nov 2005
Location: .
Age: 43
Posts: 2,545
|
Ok. It doesnt say that when you save the file!
Quote:
As you might guess, i never use mix-mode! |
|
![]() |
![]() |
#32 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Does anyone know how to make Blitz 2 load user libraries? I've been following the instructions by the Blitz 2 author but I can't get it to see my self made library.
At startup Blitz will look for the deflibs file in its root directory and load it if present. This file is a digest of libraries. If this file is not present it is supposed to look for the blitzlibs: directory and load all libraries present there and in the sub directories, but this never seems to work. If I use the makedeflibs tool to create a new deflibs file out of all libraries I get a file which is larger than the original, but seemingly lacking some of the more basic commands, and of course my own commands. Anyone? |
![]() |
![]() |
#33 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
Basically the libs need to be incorporated in the deflibs file. There are 2 lib files. Acidlibs which are all the acid libraries.. and deflibs.. Each library has a unique ID upto 255 which it needs assigning. The libs are then combined and can be used.
|
![]() |
![]() |
#34 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Yes this is what the makedeflibs tool does - it loads all individual libraries in the blitzlibs: directory and sub directories and digests them into this deflibs file, but for some reason it does not include my own library properly. Still, the author himself does write that if the deflibs file is not present it will load the individual libraries instead from the blitzlibs: directory. Does this work for anyone?
One thing it does do is act on the command names, and do erroneous highlighting on them. F.ex if I type my command "OMEDInit" it will replace it with "EndInit" and highlight the End keyword. |
![]() |
![]() |
#35 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
try using deflibman.. It is what I used to use.. There is another prgram that does the same but is far more versatile.. Cannot remember its name though :/
|
![]() |
![]() |
#36 |
Wipe-Out Enthusiast
Join Date: Nov 2005
Location: .
Age: 43
Posts: 2,545
|
i use http://aminet.net/package/dev/basic/BlitzLibMan 'Blitz Lib Man' to manager my libraries.
It lets you scan BlitzLibs: and switch on/off your libraries as required, from which you can then rebuild the deflibs file. I used it to get the ProTracker libraries working and it's proven itself to work rather well. |
![]() |
![]() |
#37 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Alright this took some time. I've had to rewrite small bits of the replay routine to make the extension work after I finally figured out that an extension must only contain a single hunk (a BB extension is a plain AmigaOS executable) or it will fail to load/screw other extensions up.
The BB2 author's guide to extensions is brief and doesn't mention how to do complete error checking and reporting back to BB2, so the error checks are few. All MEDs I've tried so far have played fine though. Let me know if there are any errors and we'll see if we can fix them. OMEDOn OMEDOff - Turn OMED on and off. OMEDLoadFromFile "filename" - Load MED from disk. OMEDUnload - Unload current MED. OMEDPlay [song] - Play the first song, or any song from 1 to N. OMEDStop - Stop playing. OMEDContinue - Continue playing. OMEDVolume volume - Set volume from 0 to 64. Last edited by Leffmann; 17 January 2010 at 13:55. |
![]() |
![]() |
#38 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Legendary work Leffman.
![]() |
![]() |
![]() |
#39 |
Wipe-Out Enthusiast
Join Date: Nov 2005
Location: .
Age: 43
Posts: 2,545
|
Leffman, that is excellent. Thank you very much. I hope you will be putting this on Aminet when it is done? (And hopefully including your source for anyone who wished to learn from it?)
I have a few things i'd like to ask about; - the original MED commands in BB2 allowed you to start the tune at a different Song position. Do you think this would be possible to add as a second (optional) parameter for OMEDPlay? E.g. OMEDPLAY 1,5 - play song 1 of loaded song from position 5.? The other thing i would ask about is that the old command (and similarly, the PT commands i'm using) allow you to load several tunes at once into 'banks' . Is there any mention of how to do this in the docs, and/or would it be difficult to add? (i guess this would mean a 3rd parameter in OMEDPLAY!) Anyway, current version is very good and will help me a lot i'm sure. ![]() |
![]() |
![]() |
#40 |
Wipe-Out Enthusiast
Join Date: Nov 2005
Location: .
Age: 43
Posts: 2,545
|
ok. post number two.
I have implemented this into my test program, which currently plays 3 different meds. Due to the limit i mentioned above with the non-usage of banks, these are each loaded upon selection, and then played (rather than my previous "preload" method) However, the chip memory consumption between loading and closing the program, even with the current module being "unloaded" and OMedOff being called at the end of my program, is alarming. Ok, so my MEDs are quite big. a few hundred Kilobytes each. but even running a memory clearing program when back into workbench did not help. additional: i have found that if i now use OMedUnload before i load a new module, there is no such problem with the chipmem. I cant help but think this "problem" would be easier/more obvious to work-around with the multi-loading system in place - although it is currently helped by the fact the Unload does not complain if there is not a MED loaded. Anyway, i dont want to create too much for you to look into Leffman, but i think what you've created here is something really useful. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
AMOS or Blitz Basic 2 | Dreedo | Coders. General | 42 | 23 September 2014 21:48 |
Blitz basic 2 Help | Havie | Coders. Blitz Basic | 30 | 08 September 2013 09:15 |
blitz basic | petza | request.Apps | 11 | 08 April 2007 01:49 |
Blitz Basic 2 anyone? | jobro | request.Apps | 12 | 28 November 2005 18:15 |
Blitz Basic 2 | LaundroMat | Retrogaming General Discussion | 5 | 24 July 2001 08:10 |
|
|