English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. AMOS

 
 
Thread Tools
Old 25 January 2015, 22:34   #41
lordofchaos
TinkerTailorContentMaker
 
lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 45
Posts: 1,210
Ok, amended. Program now runs, loads song and plays directly after.
lordofchaos is offline  
Old 25 January 2015, 22:35   #42
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
does it stop when you press a key without crashing?
Mrs Beanbag is offline  
Old 25 January 2015, 22:42   #43
lordofchaos
TinkerTailorContentMaker
 
lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 45
Posts: 1,210
Yes, song stops but doesn't crash. If I run the program directly afterwards I get "error opening med library" despite erasing the banks before running.
lordofchaos is offline  
Old 25 January 2015, 22:46   #44
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
right you probably need to free the player, try a "lib call (1,-36)"

otherwise, we're cooking on gas.

now you can do
Code:
track load "music.med",5
ppsave "music.pp",5,4
and replace the track load with a pp load in the player.
Mrs Beanbag is offline  
Old 25 January 2015, 22:53   #45
lordofchaos
TinkerTailorContentMaker
 
lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 45
Posts: 1,210
Ok, I`m taking it you mean to amend the program with "lib call (1,-36)"? I changed it and ran program again with same "error opening med.library"
lordofchaos is offline  
Old 25 January 2015, 22:54   #46
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
put it at the end of the program. also, do it now from immediate mode.

for future reference here are all the library function offsets from the Music extension source code
Code:
_MEDGetPlayer		equ	-30
_MEDFreePlayer		equ	-36
_MEDPlayModule		equ	-42
_MEDContModule		equ	-48
_MEDStopPlayer		equ	-54
_MEDDimOffPlayer	equ	-60
_MEDSetTempo		equ	-66
_MEDLoadModule		equ	-72
_MEDUnLoadModule	equ	-78
_MEDGetCurrentModule	equ	-84
_MEDResetMIDI		equ	-90
_MEDSetModnum		equ	-96
_MEDRelocModule		equ	-102
Mrs Beanbag is offline  
Old 25 January 2015, 23:05   #47
lordofchaos
TinkerTailorContentMaker
 
lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 45
Posts: 1,210
Quote:
Originally Posted by Mrs Beanbag View Post
put it at the end of the program. also, do it now from immediate mode.

for future reference here are all the library function offsets from the Music extension source code
Code:
_MEDGetPlayer        equ    -30
_MEDFreePlayer        equ    -36
_MEDPlayModule        equ    -42
_MEDContModule        equ    -48
_MEDStopPlayer        equ    -54
_MEDDimOffPlayer    equ    -60
_MEDSetTempo        equ    -66
_MEDLoadModule        equ    -72
_MEDUnLoadModule    equ    -78
_MEDGetCurrentModule    equ    -84
_MEDResetMIDI        equ    -90
_MEDSetModnum        equ    -96
_MEDRelocModule        equ    -102
Ok amended. Song plays after repeated loading.. Now time to pack again.. Thanks for your help and time, should be able to get things moving along now.
lordofchaos is offline  
Old 26 January 2015, 13:28   #48
lordofchaos
TinkerTailorContentMaker
 
lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 45
Posts: 1,210
So close but no cigar The player does load the packed tune but nothing can be heard, it doesn't throw up any errors, only silence. Bank 5 shows "tracker".

The code for the player shown on snapshot.

Last edited by lordofchaos; 19 July 2019 at 15:19.
lordofchaos is offline  
Old 26 January 2015, 13:44   #49
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
hmm... and you didn't play the tune before packing it? it should have just been freshly loaded into the bank because i think the relocate function must change it in some way.
Mrs Beanbag is offline  
Old 26 January 2015, 13:51   #50
lordofchaos
TinkerTailorContentMaker
 
lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 45
Posts: 1,210
The tune does play after being loaded in, after the wait key instruction AMOS then packs it/saves to disk. This is code for packing >

Last edited by lordofchaos; 19 July 2019 at 15:19.
lordofchaos is offline  
Old 26 January 2015, 13:54   #51
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
yes you are loading the music with "track load" first, then you are playing it, which will CHANGE it, then packing it at the end. And it is packing the version that has already been relocated into some other area of memory, so it's not all there.

Just do track load IMMEDIATELY followed by ppsave.
Mrs Beanbag is offline  
Old 26 January 2015, 14:02   #52
lordofchaos
TinkerTailorContentMaker
 
lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 45
Posts: 1,210
Eureka! A stupid mistake on my part! Ok the song is now packing correctly and playing back in the player correctly!

Thank you

I`m sure this thread/info will prove useful to others too.

Last edited by lordofchaos; 26 January 2015 at 14:08.
lordofchaos is offline  
Old 26 January 2015, 14:05   #53
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
hoorah! so what is the compression ratio like after all that?
Mrs Beanbag is offline  
Old 26 January 2015, 14:10   #54
lordofchaos
TinkerTailorContentMaker
 
lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 45
Posts: 1,210
Quote:
Originally Posted by Mrs Beanbag View Post
hoorah! so what is the compression ratio like after all that?
Pretty impressive

140880 Compressed
237260 Original
lordofchaos is offline  
Old 26 January 2015, 21:22   #55
Lonewolf10
AMOS Extensions Developer
 
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
Yeah, that's the kinda compression I like
Lonewolf10 is offline  
Old 27 January 2015, 00:06   #56
lordofchaos
TinkerTailorContentMaker
 
lordofchaos's Avatar
 
Join Date: Nov 2009
Location: Bedfordshire
Age: 45
Posts: 1,210
Quote:
Originally Posted by Lonewolf10 View Post
Yeah, that's the kinda compression I like
Yes, I didn't think the compression would be that good, for my second music disc I shall include a lot more tunes/gfx...

I have uploaded the completed disc in the zone, self booting and should run on A500+ upwards. Thanks to everybody that helped me out!


Last edited by lordofchaos; 27 January 2015 at 00:36.
lordofchaos is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
AMOS or Blitz Basic 2 Dreedo Coders. General 42 23 September 2014 21:48
Compilation issues using Amos Pro and WinUAE CaptainNow Coders. Language 3 06 May 2014 15:22
jAMOS - new AMOS BASIC reimplementation in Java Mequa News 16 03 June 2012 16:58
jAMAL - AMOS BASIC AMAL reimplementation in Java! Mequa News 26 31 January 2012 02:12
Where's the amos.library on the 3-disk AMOS set? andreas support.Apps 0 15 November 2001 16:04

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 23:59.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.16129 seconds with 16 queries