It is currently Fri May 26, 2017 9:25 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 59 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: Sun Dec 20, 2015 1:23 pm 
Offline
User avatar

Joined: Mon Feb 07, 2011 12:46 pm
Posts: 887
tepples wrote:
I'm supporting both behaviors in Pently's music compiler tool, selected with the command durations temporary or durations stick. But I wonder which to make the default.
If you can change it easily then it isn't really important which is the default, although in my opinion the MML style should be default since some people (including myself) may have used ppMCK to write music (while LilyPond is mainly for sheet music instead).

_________________
.


Top
 Profile  
 
PostPosted: Sat Dec 26, 2015 8:47 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18356
Location: NE Indiana, USA (NTSC)
Just as a reality check, would this be any easier to understand?
Code:
# Twinkle test
# by Damian Yerrick

durations stick
notenames english

# Drum kit ########################

sfx noisekick on noise
  pitch 10 0
  volume 10 10 8 6 4 3 2 1

sfx trikick on triangle
  pitch e' c' a f# e
  volume 15 15 15 2 2

sfx closedhihat on noise
  pitch 12
  timbre | 0 1
  volume 5 3 2 1 1

sfx openhihat on noise
  pitch 12
  timbre | 0 1
  volume 6 5 4 4 3 3 3 2 2 2 1 1 1 1 1

drum kick noisekick
drum tkick noisekick trikick
drum clhat closedhihat

# Instruments ######################

instrument fiddle
  timbre 1
  volume 3 6 7 6 6 5
  detached

instrument bass

# twinkle ######################
song twinkle
  time 6/8
  scale 8

  pattern melody with fiddle on pulse2
    orelative
    c'4. c g g a a g2.
    f4. f e e d d c2.
    g4. g f f e e d2.
    g4. g f f e e d2.

  pattern bassline with bass on triangle
    orelative
    c' g e g f c e c
    d f c e g b, c' g
    e g d f c e g d
    e g d f c e g g,

  pattern bassfinal with bass on triangle
    c'2.

  pattern beat
    kick4. clhat kick clhat4 clhat8

  at 1
  tempo 90
  play melody
  play beat
  play bassline

  at 23
  tempo 75

  at 24
  tempo 60
  play bassfinal

  at 24:2
  stop drum

  at 25
  fine


And this is what it's supposed to represent:
Attachment:
twinkle.png
twinkle.png [ 4.57 KiB | Viewed 4017 times ]


Attachments:
pently.nsf [1.8 KiB]
Downloaded 98 times
Top
 Profile  
 
PostPosted: Sat Dec 26, 2015 10:29 pm 
Offline
User avatar

Joined: Mon Feb 07, 2011 12:46 pm
Posts: 887
That looks like OK. It doesn't seem to quite match other formats but I think it is OK anyways; it is good for this music engine.

_________________
.


Top
 Profile  
 
PostPosted: Mon Dec 28, 2015 6:29 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18356
Location: NE Indiana, USA (NTSC)
So let's see if you can figure it out.

No significant changes to the player itself, just the tools around it:
  • Experimental music preprocessor with syntax inspired by MML and LilyPond
  • Ported all data conversion tools to Python 3
  • NES shell: Hold Select to speed up by factor of 4


Attachments:
pently-0.05wip2.zip [70.09 KiB]
Downloaded 108 times
Top
 Profile  
 
PostPosted: Wed Dec 30, 2015 3:07 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1576
Location: DIGDUG
I've been meaning to give the new Pently version a try, but I have a lot on my mind this week. I do appreciate that you included Python 3 stuff.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Sat Jan 02, 2016 3:24 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18356
Location: NE Indiana, USA (NTSC)
After this, I guess my next step is to make a FamiTracker text export to Pently input converter. It won't aim for fidelity as much as just being able to get patterns out. Here are the compromises that I had planned to make:

  • Custom frame rates are used only for tempo processing, not for envelope processing.
  • The first VRC6, MMC5, or Sunsoft 5B channel is mapped to the attack track.
  • The noise and DPCM channels are ignored entirely.
  • The volume column is ignored.
  • Recognized effects include arpeggio (0xx -> ENxx), portamento to target pitch (3xx -> legato on/off), grace note wait before row (Gxx), grace note before rest (Sxx), pattern break (D00), note slide (Qxy or Rxy), song end (C00 -> fine), pattern jump (Bxx -> segno and dal segno), speed (Fxx), and tempo (Fxx). Others are ignored.
  • Portamento to target pitch is reinterpreted as legato when nonzero (301 through 3FF) and not-legato when zero (300).
  • Note slide (Qxy or Rxy) is treated as a slide to a legato note y semitones up or down one row later.
  • Pattern break (Dxx) is always assumed to jump to row 00.
  • It is not recommended to include a lot of tempo/speed changes in a single pattern, as each will expand to a setTempo in the conductor track.

I'm not sure how to handle the noise channel, as FamiTracker allows playing a noise instrument at any pitch, while Pently assumes that all drum instruments use what FT calls "fixed" envelopes. In addition, all drums in Pently have finite length, while FT allows volume envelopes that end on a volume other than 0 (constant sustain). Should I treat each pitch at which a drum instrument is played as a separate drum?

And how would I go about figuring out the time signature in order to set the scale (whether a row means an eighth, sixteenth, or thirty-second note) and calculate measure numbers for at commands?

And is there demand for a way to assemble an NSF or NES program without having to have ca65 and ld65 installed?


Top
 Profile  
 
PostPosted: Sat Jan 02, 2016 6:04 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1576
Location: DIGDUG
Quote:
volume column is ignored

Is there no volume control in Pently??

Quote:
Should I treat each pitch at which a drum instrument is played as a separate drum?

Yes.

Quote:
And how would I go about figuring out the time signature

Ask the user to enter input, or command line argument

Quote:
And is there demand for a way to assemble an NSF or NES program without having to have ca65 and ld65 installed?

I'm fine with ca65, but it might limit the # of users.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Sat Jan 02, 2016 7:06 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18356
Location: NE Indiana, USA (NTSC)
dougeff wrote:
Quote:
volume column is ignored

Is there no volume control in Pently??

Volume envelopes work; just not the volume column.

Quote:
Quote:
Should I treat each pitch at which a drum instrument is played as a separate drum?

Yes.

Hopefully that doesn't run into the 25 drum limit for too many projects.

The key signature (which controls choice of say D# vs. Eb), time signature, and scale may change from song to song or even during a song. The user may end up having to create a skeleton conductor track.


Top
 Profile  
 
PostPosted: Tue Jan 12, 2016 3:42 pm 
Offline
Formerly 43110
User avatar

Joined: Wed Feb 05, 2014 7:01 am
Posts: 291
Today I included pently into my main project, and this post is some of my initial thoughts and questions.

First of all I probably could of use any of the other freely usable solutions, but I like the conductor/pattern structure of the music as explained, and I also liked the general style of music so far composed so far.

For the functions that use fixed zero page locations (such as "snddatalo = 0" in pently_start_sound) I often assign them to a relocatable label called temp. Witch would be better to require? A 5 byte variable import or externally reserving specifically zero page 0 through 4?

pently_resume_music and pently_stop_music were not found with the linker.

I know this is not the case with every music engine (except maybe nerdtracker2), but i wonder if it's even possible to design the music data to be relocate without having to recompile the network of address pointers. I also wonder if it's easy to construct and play a pattern from RAM, so that there could be an option for the user to create and save some of her own music.


Top
 Profile  
 
PostPosted: Tue Jan 12, 2016 5:35 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18356
Location: NE Indiana, USA (NTSC)
43110 wrote:
For the functions that use fixed zero page locations (such as "snddatalo = 0" in pently_start_sound) I often assign them to a relocatable label called temp. Witch would be better to require? A 5 byte variable import or externally reserving specifically zero page 0 through 4?

I have externally reserved $0000-$000F in all my own projects, starting the ZP segment at $0010. But the next release will allow temporary ZP to be relocated.

Quote:
pently_resume_music and pently_stop_music were not found with the linker.

My bad. This will be corrected in the next release. Until I push it out, go down to line 156 or so and change .proc resume_music and .proc stop_music to have the prefixed names.

Quote:
I know this is not the case with every music engine (except maybe nerdtracker2), but i wonder if it's even possible to design the music data to be relocate without having to recompile the network of address pointers.

In NT2, all offsets are ultimately relative to the start of a song, and songs cannot share instruments or patterns. I don't know how instrument or pattern sharing is possible with that sort of relocation.

Quote:
I also wonder if it's easy to construct and play a pattern from RAM, so that there could be an option for the user to create and save some of her own music.

The Sound Effects Editor included in Double Action 53 uses a subset of Pently 0.04 configured to store sound effects' envelope data in RAM. If you want to make something larger in scope, you could set it up such the tables are at fixed positions in WRAM ($6000-$7FFF).


Top
 Profile  
 
PostPosted: Thu Jan 14, 2016 7:39 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18356
Location: NE Indiana, USA (NTSC)
Got a new work in progress version:

0.05wip3 (2016-01)
  • Corrected namespacing of pently_stop_music and pently_resume_music (reported by 43110)
  • Allows relocating temporary zero page space (requested by 43110)
  • pentlyas.py: Refactored without "god object"
  • pentlyas.py: Changed syntax for arpeggio effect; the original was based on a misreading of MCK Beginner's Guide
  • pentlyas.py: Optimizes out data of combined envelopes (instrument attacks and sound effects) that are a subsequence of a longer one. This improves handling of the "latebanjo" and "bf98flute2" instruments in the example songs.


Attachments:
pently-0.05wip3.zip [75.65 KiB]
Downloaded 70 times
Top
 Profile  
 
PostPosted: Sat Jan 30, 2016 9:36 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18356
Location: NE Indiana, USA (NTSC)
In this post, Kasumi wrote:
They might say, "I need you to type up every single note/rest in a file in this format." And then you have to do it if that's how their game works and you want to make music for it. Or write your own program to make that easier for yourself. Or make them write a program to make it easier for you.

Other than the obvious conversion from FamiTracker's text export, what other conversion source formats are expected?

Kasumi wrote:
Different engines/converters might make the same song wildly different filesizes, so there's no answer to how big the song could/should be.

Here's a formula to estimate the ROM size of a Pently project:
  • Engine: about 1.5 KiB
  • Sound effect: 4 bytes plus 2 bytes for each frame in the envelope
  • Drum: 2 bytes each
  • Instrument: 3 bytes plus 2 bytes for each frame in the envelope
  • Song: 4 bytes, plus 2 bytes for each tempo change, plus 4 bytes for each play or stop command
  • Pattern: 3 bytes, plus 1 for each note or rest, plus additional bytes for notes with oddball tied durations, plus 2 for each range shift (if the range is wider than 24 semitones), plus 2 for each legato (HOPO) sequence, plus 2 for each instrument change, plus 2 for each arpeggio change

In other news, qix in #nesdev plans to help me learn how to use Git and has put Pently on GitHub.


Top
 Profile  
 
PostPosted: Fri Apr 01, 2016 11:36 am 
Offline
User avatar

Joined: Fri Jan 24, 2014 9:05 am
Posts: 120
Location: Hungary
Is it possible to create a comprehensive guide that tells what can and cannot be when someone is composing music for Pently in Famitracker? (Also, I assume this is based on the current official stable build, though the 0CC fork has effects that equate Pently effects a lot better, like grace notes with Txy which is a delayed "note transposition")
I might be composing a soundtrack for a game using Pently, and as a someone who's been a Famitracker user for 6 years, a plethora of different questions pop up even when trying to come up with ideas for music. Can I do X or Y, or Z? What is the Famitracker equivalent to drums in Pently? Even having read the manual and a number of different posts, it's still a bit of a mess in my head, and at this point it might be worth learning how to use the engine as intended with the text/MML-style sort of thing. From what I can tell it's not too much different from making music with an assembly source by using labels, constants and whatever, but even if I end up going that route I'd say it's worth making a guide for people who want to go strictly with Famitracker because if someone is hired to make music in Famitracker, they need to have the rules explained to them thoroughly.


Top
 Profile  
 
PostPosted: Fri Apr 01, 2016 11:59 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1576
Location: DIGDUG
I thought he didn't have famitracker to pently support yet.

Also, I thought he was going to develop a pently specific GUI tracker...which would make famitracker support unnecessary.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Fri Apr 01, 2016 12:33 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18356
Location: NE Indiana, USA (NTSC)
za909 wrote:
Is it possible to create a comprehensive guide that tells what can and cannot be when someone is composing music for Pently in Famitracker?

Not until I actually make the converter. I haven't had much of a chance to do so for two reasons: my recent illness and my having been hired to work on another NES game. Until then, please follow the guidelines described above at "Here are the compromises that I had planned to make" to see which envelopes and effects are most likely to end up ignored. Vibrato is ignored, and portamento-type effects become legato notes.

I apologize for the inconvenience, but paid projects, housework, my finances, and personal physical fitness take precedence over free projects, and I have not yet been hired to work on Pently. I had planned to incorporate Pently into my previous paid project, but the boss instead ended up going with a different playback engine because the project's composer found the "vibrato is ignored" and "portamento-type effects become legato notes" limits unacceptable.

Quote:
What is the Famitracker equivalent to drums in Pently?

I plan to associate each combination of a noise pitch and noise instrument with a separate drum. If there are more than 25 such combinations, I plan to make conversion fail with an error message whose wording I have not yet made final.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 59 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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