Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 17:55 28 Mar 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM2: V5.05.05 beta

     Page 6 of 7    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 07:05am 25 Aug 2020
Copy link to clipboard 
Print this post

  Quote  The download from Geoff's site is still beta19 dated 23th August.
Could you reload it please.

Done

http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip
 
berighteous
Senior Member

Joined: 18/07/2020
Location: United States
Posts: 110
Posted: 07:46am 25 Aug 2020
Copy link to clipboard 
Print this post

yeah, but I want my default to be mode 3,8... (ducks and runs)

I'm an apple ][ programmer and I'm finishing a 6502 assembly game for it and I live in 40 columns.
Edited 2020-08-25 17:48 by berighteous
 
TweakerRay

Senior Member

Joined: 01/08/2020
Location: Germany
Posts: 138
Posted: 02:43pm 25 Aug 2020
Copy link to clipboard 
Print this post

Thank you matherp - Now my DE Keyboard works as supposed...
I uploaded the new beta and now I can type the ' and also #
Sad that I first had to buy a new keyboard to approve that it isn't my fault but the fault in the firmware... but hey... I am happy that you fixed it so
Thanks a lot for your work !    

Cheers TweakerRay
http://tweakerray.bandcamp.com
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 03:06pm 25 Aug 2020
Copy link to clipboard 
Print this post

  Quote  Sad that I first had to buy a new keyboard to approve that it isn't my fault but the fault in the firmware



You didn't prove anything. The issue was in the mapping table provided by another German user who presumably had a keyboard with a subtly different layout as he didn't have the issue. Luckily for you Darthvader put in the slog work to identify the issue which is that different German keyboard use different keys for those characters. The mapping table now has those characters on two different keys something which isn't required for any other language variant
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 425
Posted: 06:07am 26 Aug 2020
Copy link to clipboard 
Print this post

hi jim

  TassyJim said  

Which firmware version are you using?

Jim


I am in v5.05.05b19

Function "option default mode x" don't work correctly
on "option default mode 1" it give same as mode 1,8 (i am ok)
but "option default mode 1,16" give also mode 1 in 8bits, not in 16 bits

and now I have some problems with mode 9, but maybe it is my screen.
Edited 2020-08-26 16:07 by goc30
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5867
Posted: 06:48am 26 Aug 2020
Copy link to clipboard 
Print this post

  goc30 said  hi jim

I am in v5.05.05b19

Function "option default mode x" don't work correctly
on "option default mode 1" it give same as mode 1,8 (i am ok)
but "option default mode 1,16" give also mode 1 in 8bits, not in 16 bits

and now I have some problems with mode 9, but maybe it is my screen.


"option default mode x" will always give you the 8 bit colour depth.

Jim
VK7JH
MMedit   MMBasic Help
 
TweakerRay

Senior Member

Joined: 01/08/2020
Location: Germany
Posts: 138
Posted: 03:09pm 26 Aug 2020
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Sad that I first had to buy a new keyboard to approve that it isn't my fault but the fault in the firmware



You didn't prove anything. The issue was in the mapping table provided by another German user who presumably had a keyboard with a subtly different layout as he didn't have the issue. Luckily for you Darthvader put in the slog work to identify the issue which is that different German keyboard use different keys for those characters. The mapping table now has those characters on two different keys something which isn't required for any other language variant


I think you skipped the main part of my message: THANK YOU FOR YOUR HARD WORK !!!
(And my appologize, if that message above seemed like an attack because you wrote in a defensive way back)

I am happy that the keyboard now works. So again a BIG THANKS for your work !!!

Have a cool rocking day !

Cheers TweakerRay  
http://tweakerray.bandcamp.com
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 10:13am 27 Aug 2020
Copy link to clipboard 
Print this post

CMM2 V5.05.05b21 posted

http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip

This hopefully kills a bug related to PWM on channel 2.

The big change is a new audio capability written by Andrew West which I have incorporated.

Now if you're playing a MOD music file, you can trigger up to four additional samples at once for sound effects, like this:

PLAY MODSAMPLE sampleno, channelno [,volume] [,samplerate]
This eliminates the need to repeatedly load sounds from the SD card as they are incorporated into the mod file, and uses its own separate channels so you don't use up channels in your MOD file.

This is meant to be an alternative to PLAY EFFECT but is compatible with it, so you can play multiple simultaneous sound effects over a MOD file instead of just one. Also, they don't have to load constantly from the SD card. However, the sound effects have to be samples in the MOD file itself.

So for example, let's say you have a MOD file that you want to play in the background. It has the following samples:

01: Piano
02: Bass
03: DrumLoop

You also want to have some sound effects. So you add these samples to the MOD:

05: Laser
06: Explosion
07: GameOverVoice

In your game, you play the song with PLAY MODFILE "song.mod". Then while the music is playing, somebody shoots a laser.

PLAY MODSAMPLE 5, 1

That plays sample 5 on channel 1. Then there is an explosion.

PLAY MODSAMPLE 6, 2

We used channel 2 this time so it doesn't interrupt effects playing on channel 1. There are four dedicated channels for sound effects that are separate from the regular MOD channels so they don't interfere with the music. If you want you can specify a volume for the effect in the range 0-64. 64 (full volume) is the default.

It is possible to use PLAY MODFILE, PLAY EFFECT, and PLAY MODSAMPLE all at the same time if you want.

Questions and answers
  Quote  I assume to use the new code you are going to use some sort of external editor to add the samples to the mod file?

Yes, it is necessary to use a mod file editor (there are many free ones) to add the samples.
  Quote  Does the code cater for issuing the command again while a sample is playing? What happens?

Yes. If you play a sample on a channel that is already playing, the new sample will interrupt the old one and play immediately. If you play a sample on a channel that is not playing while another channel is playing, then both samples will play at once. You can see this in the demo program. Try pressing a key rapidly, holding it down, or pressing two keys at once.
  Quote  Is there any way for a user to know if a sample is playing or can there be?

Yes: Use MM.INFO(SAMPLE PLAYING n). See the demo for an example
  Quote  What happens if I try and play a sample that doesn’t exist?

If the sample number is greater than 31 (the maximum), then it will generate an "Invalid channel number" error. If there is no sample in the slot, it won't do anything (sample length and position will be zero, so it will skip over that sample when rendering). All 31 samples always "exist" in a MOD file, but if you don't load one with sample data, it will just be zero-length.
  Quote  What happens if I play one of the samples in the original MOD file?

It will just play the sample. The code doesn't know what is an instrument sample and what is a sound effect. They're all just samples. In fact, you don't "have to" add sound effects to the MOD file if playing the original samples is useful to you.
One minor drawback is that if you want to use the same sound effects with multiple MOD files, you have to copy them and there will be some duplication.

Sample Code
PLAY MODFILE "song.mod"

PRINT "Module Sound Effects Player"
PRINT
PRINT "Press one of the following:"
PRINT
PRINT "1: Jump effect"
PRINT "2: Coin effect"
PRINT "3: Grow effect"
PRINT "4: Shrink effect"
PRINT
PRINT "5: Set double sample rate"
PRINT "6: Set normal sample rate"
PRINT "7: Set half sample rate"
PRINT
PRINT "Esc: Quit"

sampleRate = 16000

DO
 i$ = inkey$

 IF i$ = "1" THEN PLAY MODSAMPLE 26, 1, 32, sampleRate
 IF i$ = "2" THEN PLAY MODSAMPLE 27, 2, 32, sampleRate
 IF i$ = "3" THEN
   PLAY MODSAMPLE 28, 3, 32, sampleRate
   do while mm.info(sample playing 3):loop 'wait for sample to finish
 endif
 IF i$ = "4" THEN
   PLAY MODSAMPLE 29, 4, 32, sampleRate
   play effect "gunshot" 'play an effect as well
 endif
 IF i$ = "5" THEN sampleRate = 32000
 IF i$ = "6" THEN sampleRate = 16000
 IF i$ = "7" THEN sampleRate = 8000

 IF ASC(i$) = 27 THEN EXIT DO
LOOP

Resource files


gunshot.zip
Edited 2020-08-27 20:20 by matherp
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1124
Posted: 12:02pm 27 Aug 2020
Copy link to clipboard 
Print this post

Hi Peter,

I propose two little changes for the next beta (if not yet taken into account):

1. If I exit a program with Ctrl-C, a "C" appears at the command prompt.  I don't think that's intentional. IMHO the keyboard buffer should be cleared first.
2. When I cut and paste something in the "Editor", a return (CR character) is undesirably appended to the pasted text. Ie a new blank line is inserted.

Thank you for your great job!
Best regards
Michael
Edited 2020-08-27 22:21 by twofingers
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 12:58pm 27 Aug 2020
Copy link to clipboard 
Print this post

  Quote  1. If I exit a program with Ctrl-C, a "C" appears at the command prompt.  I don't think that's intentional. IMHO the keyboard buffer should be cleared first.
2. When I cut and paste something in the "Editor", a return (CR character) is undesirably appended to the pasted text. Ie a new blank line is inserted.


1. No is doesn't, more info needed to demonstrate how you get this
2. This is because you select the end of line and occurs when the next line is blank. Try the following:

locate at beginning of line, press F4
Press END to go to the end, press F5
position the cursor where you want the new line and press F5. No extra line
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1124
Posted: 01:51pm 27 Aug 2020
Copy link to clipboard 
Print this post

Hi Peter,

seems difficult to replicate. I will further investigate. At least yesterday I encountered the issue many times.

Thanks!

Michael
 
SWA-Guy
Newbie

Joined: 01/02/2019
Location: Germany
Posts: 24
Posted: 02:45pm 27 Aug 2020
Copy link to clipboard 
Print this post

Hello Peter,

I'm currently programming on an MP3 Player and use the command "PLAY MP3 File$".
If I change now to the nexte MP3 song with "Play next" or "Play previous" I hear at every change an annoying "Plopp" or click.

Is there a possibility to eleminate this "Plopp"?

If you use the Filemanager to start a MP3 song you can also hear this "Plopp"

Thanks in advance.
Edited 2020-08-28 00:46 by SWA-Guy
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1028
Posted: 02:49pm 27 Aug 2020
Copy link to clipboard 
Print this post

Hi Peter

I'm still having PWM 2 problems.

Maybe some cable problems as well not helping. Pins from about 29 onwards were not responding to 1 when set to DOUT.

Will do more tests later on.

Thanks

Brian
ChopperP
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 05:18pm 27 Aug 2020
Copy link to clipboard 
Print this post

  Quote  Is there a possibility to eleminate this "Plopp"?


b22 when posted should fix this
 
MauroXavier
Guru

Joined: 06/03/2016
Location: Brazil
Posts: 303
Posted: 11:10pm 27 Aug 2020
Copy link to clipboard 
Print this post

The sample rate on the PLAY MOD SAMPLE command does not change the sound for me. I guessed that the sample rate could change the speed and pitch of the sound, or am I wrong?
 
AndyWest
Newbie

Joined: 28/08/2020
Location: United States
Posts: 1
Posted: 05:42am 28 Aug 2020
Copy link to clipboard 
Print this post

  MauroXavier said  The sample rate on the PLAY MOD SAMPLE command does not change the sound for me. I guessed that the sample rate could change the speed and pitch of the sound, or am I wrong?


You're correct. I've just downloaded the firmware from the link and it's not working as intended. It does work when I build the firmware myself, so I'll contact Peter and we'll figure it out. Thanks for letting us know!
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 07:22am 28 Aug 2020
Copy link to clipboard 
Print this post

CMM2 V5.05.05b22 posted

http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip

Fixes bug in accepting the sample rate in the new PLAY MOD SAMPLE command
Removes the "pop" on the audio when powering up or resetting the CMM2
Removes the "pop" when starting and stopping playing mp3 files
 
SWA-Guy
Newbie

Joined: 01/02/2019
Location: Germany
Posts: 24
Posted: 09:01am 28 Aug 2020
Copy link to clipboard 
Print this post

  Quote  
I'm currently programming on an MP3 Player and use the command "PLAY MP3 File$".
If I change now to the nexte MP3 song with "Play next" or "Play previous" I hear at every change an annoying "Plopp" or click.

Is there a possibility to eleminate this "Plopp"?




Hello Peter,

thanks for the fast fix. Playing MP3-files is now perfect.

Greeting from Germany.
 
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 03:44am 29 Aug 2020
Copy link to clipboard 
Print this post

  matherp said  
  Quote  1. If I exit a program with Ctrl-C, a "C" appears at the command prompt.  I don't think that's intentional. IMHO the keyboard buffer should be cleared first.
2. When I cut and paste something in the "Editor", a return (CR character) is undesirably appended to the pasted text. Ie a new blank line is inserted.


1. No is doesn't, more info needed to demonstrate how you get this
2. This is because you select the end of line and occurs when the next line is blank. Try the following:

locate at beginning of line, press F4
Press END to go to the end, press F5
position the cursor where you want the new line and press F5. No extra line


  twofingers said  Hi Peter,

seems difficult to replicate. I will further investigate. At least yesterday I encountered the issue many times.

Thanks!

Michael


I get this sometimes, I think I found how to replicate it (ETA: the Ctrl-C issue)

If I press Ctrl, then press C, then release C, then release Ctrl, it doesn't happen.
If I press Ctrl, then press C, then release Ctrl, then release C, it does happen.

I usually release both quickly without paying attention to the order so it only sometimes happens.
Edited 2020-08-29 13:45 by capsikin
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 07:39am 29 Aug 2020
Copy link to clipboard 
Print this post

It happens if you are still holding C after releasing Ctrl and the auto-repeat timer runs out. Will happen more if you have shortened the initial repeat setting. Not something I intend to try and "special case" round.
 
     Page 6 of 7    
Print this page
© JAQ Software 2024