Git Product home page Git Product logo

pt1210's Introduction

PT-1210 MK1 v1.1

The ProTracker Turntable

Credits:

  • Original Concept - Hoffman & Akira
  • Code - Hoffman & d0pefish
  • v1.1+ C Rewrite - d0pefish
  • Graphics - Akira
  • Testing - PT12 Krew

What is it?

PT-1210 is a program for DJ'ing ProTracker modules. It essentially turns your Amiga into a turntable / CDJ with nudge, pitch control and so on.

It has a number of features but the most important one is that it can re-pitch the samples played to match the BPM you want to play the tune at. This means drum and music loops will still be in sync and the other instruments will still be in key.

What do I need?

It will run on pretty much any Amiga, OSC/ESC, AGA, Accelerated and so on. I would recommend however that you run it using a CF card on the IDE port with 2 meg of chip ram. If you are using two Amigas I would also recommend that they are the same type, like two A1200's or two A600's. You can also use a hard drive, PCMCIA adapter CF Card, SD or even floppy disk.

How do I use it?

Put all your modules in a folder with the program and run it. When it starts it will scan current folder for any ProTracker modules and add them to the file selector (M.K.). It will also try to determine the BPM. Simply select a module and it will load it, take you to the player screen and start playing.

Keyboard Controls

File Selector Mode

Key Function
HELP Switch screens (load and DJ mode)
UP / DOWN Select file
RETURN Load Tune
F10 Sort list by BPM (toggles asc / desc)
F9 Sort list by Filename (toggles asc / desc)
ESCAPE Quit (hold for a second)
A-Z / 0-9 Pick first file with matching first letter
F5 Refresh folder

NOTE: Quit will not work if a tune is playing!

DJ Mode

Key Function
HELP Switch screens (load and DJ mode)
LEFT Nudge backward
RIGHT Nudge forward
SHIFT LEFT Hard nudge forward
SHIFT RIGHT Hard nudge back
UP Increase BPM
DOWN Decrease BPM
SHIFT UP Increase BPM fine tune
SHIFT DOWN Decrease BPM fine tune
SPACE Stop / Play
TAB Toggle repitch on / off
DELETE Resets tempo to original
BACKSPACE Freezes the current pitch offset when adjusting the tempo further
` Kills sound DMA
1/2/3/4 Mute / Un-mute channel
SHIFT 1/2/3/4 Solo channel
5 Un-mute all channels

Pattern / Position Functions

Key Function
F1 Jump to cue pattern
F2 Jump to cue pattern after current pattern ends
F3 Set current pattern as cue
F10 Pattern Loop (start / stop / deactivate)
+ Move forward one pattern (shift moves loop size)
- Move back one pattern (shift moves loops size)
SHIFT + Move forward line loop size
SHIFT - Move back line loop size
CTRL + Move cue pattern forward
CTRL - Move cue pattern back

Line Loop Functions

Key Function
F6 Decrease loop size
F7 Increase loop size
F5 Activate loop
F4 Toggle Slip On / Off

Pattern Looping

F10 will cycle through the pattern loop modes. The first press will store the loop start point and the second press will store the loop end point. The third press will then deactivate the loop.

Line Looping

Line looping enables you to loop small sections of the current pattern. The loop start point currently quantises to a beat (assuming speed 6) so positions 0,4,8,12,16,20,24,28... etc.

Slip mode is enabled by default. If you activate a loop with this ON, it continues increase the track position while looping. This means when you deactivate the loop, the track drops into the position of the tune as if you never looped it. You can switch to normal loop mode which will continue playing the track from after the loop point when deactivated.

BPM Detection

The BPM detection works by looking at the first line of the first pattern within the module. This seems to work pretty well as it's always the first thing you set. However, if no BPM is set on the first line, then it will assume that it is VBR timing rather than CIA and set the BPM to 125. This is fine as long as the tune has been written at, say for example a tempo of 6 or 3 as this is 125 BPM. If the module is written with no CIA timing and a tempo of say 5, then the BPM will be inacurate.

BTW - there is no way around this! ( i think! )

FAQ

Why on earth did you make this program?

It started as a discussion on the EAB forum where Akira was asking if the repitch function would be possible. After some more posts I started making a little proof of concept program with just one module. It worked and much better then we expected it to as well! Gradually over time I've added more functions, things like looping, pattern display, scopes and so on.

Can I have a system friendly version?

PT1210 is now system friendly as of version 1.1!

My module sounds weird!

The player is one of the original ProTracker replay sources so it should be pretty dam accurate. If it sounds weird, check it in ProTracker v2.3d first and fix it there. If it still sounds weird, provide us with an example and we'll take a look.

Becareful when pitching tunes up higher in BPM. As you probably know the Paula chip can only play samples up to a certain pitch. If your module runs the samples high in pitch and you push then tempo up too much, they wont go any further.

I wrote my module in FastTracker II and it crashes ProTracker!

There are a number of modules that exist where they have no REPLEN set on the samples. Our guess is they've been written in FastTracker or similar. These actually crash ProTracker when trying to play them. Crashing is a bad thing so we apply a patch to the modules on load to fix this issue.

Using different Amigas

I've tried using an A600 alongside an A1200 and found that by default they do sound different. This is because they made the A600 badly and chopped a lot of the high end off the sound. There is a hardware hack, ask Akira! I also noticed that the timing was slightly different between the two Amigas which we believe is a small difference in the two systems CIA chips. There is a fine pitch adjust which should help with this timing issue.

Who are you?

We are people who love the Amiga, love ProTracker and love DJ'ing.


Changelog

2024-04-19 It's been ten years, might as well put it all out there now :D

2014-05-06 Fixed bug where scopes would crash if they hit a sample 0. Added folder re-scan function but crashes if you switch floppy disk! (no good!)

2014-04-14 Final build before Revision, which means we are now V1.0. Program now quits if no modules are found in the folder (used to crash)

STATIC SCROLLER ALERT!!!

Firstly massive thanks to Akira for all his hard work with ideas, testing, graphics, PR and generally everything else. It's been enough work getting the code done let alone managing everything else surrounding the release of this program.

Next up massive props to Tecon, the only man I know to exploit more bugs in the PT replay source than me! Your the reason it's so dam solid now, great bug hunting.

Lastly a big thank you to all the people who have shown an interest in this little program. When we started this project I never knew so many people wanted to dust off their Amiga's and hook them up to their mixers. I hope you all enjoy playing ProTracker mods in the mix with this tool. Now you can all stop harassing Akira for a release!!

2013-03-21 BPM re-arranged, now shows fine as larger digits and percentage diff Slip mode light changed Removed one line for file selecta Copper bug fixed in file selecta Added Chip Ram notification on startup Added F8 Kb file size in file selecta Added lovely splash screen Added some easter fun! Added A-Z 0-9 keys for finding file

2013-03-05 Added fine tune BPM, working well but needs UI changes Added Cue Point mover (CTRL + -)

2013-02-28 - Tecons test run! Added blank sample so empty samples play this instead otherwise junk gets played. Reset some variables in PT Replay on load so E6 command doesnt freak Fonts now supports Underscore char Implemented n_altperiod so ARPS and Vibrato now work with Re-Pitch Bug where ED command caused pitch change too early now fixed

2014-02-26 Implemented new pattern loop sprites Grid now above and below the track display Pattern cue slip now flashes when engaged Near end of track warning now flashes track bar Increased BPM range again with saftey Diabled VB Interrupt during loading as it could cause screen corruption Fixed bug where if number of tunes is less the screen, you could scroll past and fuck everything up! Implemented Shift + / - which moves the size of the loop

2014-02-24 Track bar now replaced with overall track display with pattern splits

2014-02-14 - Datastorm! Scopes now switch off when track is paused and when new track is loaded Fixed bug where loading new tune would show the pattern from the last tune Code split for fast mem not working, need to speak to someone about that

2013-12-17 - Code name UI! Added graphics from Akira and complete UI re-work Shaved loads of memory usage Ditched all old UI code Split code into fast mem if available

2013-09-23 Added fix for what looks like lame FT2 modules where the REPLEN isn't set BPM detection will now default to 125 if not found on first line of the mod Max tunes raised to 200 Fixed bug when max number of tunes is reached it wont load anything File selector over scroll fixed (when less than a screens worth of tunes) Added key repeat function on tempo and file selection Quit is now done by holding ESCAPE key in file selector only Added file sorting by name and BPM

2013-09-04 Added channel toggles on screen! Fixed $F00 bug (god was dividing by zero!) stopped tune from restarting after ending Temporary fix on loading error but still buggy Fix for VBR CIA (Again?)

2013-09-02 Fixed bug where ARP's and Vibrato wouldn't work however don't re-pitch chip tunes, they sound shit Added pattern move forward and back Counter remove from display, pointless Pattern Loop now shows start and end only when activated Pattern Lock removed from display Now resets all values when loading a tune TO DO - Song cue point store

2013-05-17 Pattern display added File selector supports more files File selector now shows BPM! (BPM Detection on based on first line of mod) Files no longer need to be called mod., file is now checked for M.K.

2012-09-09 Inital beater

pt1210's People

Contributors

dwhinham avatar djh0ffman avatar kikendo avatar

Stargazers

igor medeiros avatar TurBoss avatar  avatar Gareth Noyce avatar  avatar  avatar Konstantin Denerz avatar Christian Kirkegaard avatar  avatar AJ Kelly avatar Sascha Reuter avatar Furrtek avatar Emery Premeaux avatar bug Q avatar Daniel avatar Nicola Avanzi avatar Levon Kohoutek avatar  avatar Maciej avatar  avatar Daniel M Karlsson avatar zen avatar Rob Smith avatar  avatar Rafał Kołucki avatar  avatar Daniel Collin avatar Nikolai Sivertsen avatar infl00pLabs avatar  avatar Michael D. avatar Peter Fors avatar Will Green avatar  avatar Olav Sørensen avatar Presley Peters avatar Aleks Seltenreich avatar a0rante avatar  avatar  avatar Roger Wetzel avatar

Watchers

a0rante avatar  avatar  avatar  avatar

pt1210's Issues

Program stuck on load when only one module in folder

This was driving me nuts.
When the number of modules in the folder is 1, the program gets stuck on load.
0 or more than 1 work fine.
The release version does this.

I played around with the directory-crawling code and made it not to crash but I have no idea exactly what was happening.

I have to send Hoffman my code so he can compare.

CIA interrupt incorrect speed

CIA interrupt is now running slightly slower under when called by the OS. Also CPU speed and fast ram look to be making an effect to this speed as well (runs different speeds on A1200 and A600 for example).

What we really want to achieve is solid timing at standard playback rate on all platforms, if possible.

@dwhinham wonder if this is something to do with the when the interrupt is confirmed?

AmigaGuide

Many pieces of Amiga software come with a nice hyperlinked AmigaGuide.

Perhaps the text of the PDF manual (#14) could be incorporated into an AmigaGuide, preferably in some kind of automated/scripted fashion to make it easy for us to keep the two in sync after updates.

C code style guide

We should come up with or pick a commonly-used code style guide to stick to throughout the project, which defines things such as (but not limited to):

  • Tabs (and tab-stop width) vs spaces
    • Currently using tabs with tabstop of 4
  • snake_case vs CamelCase
    • Currently using snake_case in the style of oldschool C
  • Variable names
    • Descriptive, but not loo long
  • Function names
    • To avoid naming conflicts with any external code we might bring in, I like the idea of projectname_modulename_functionname(), e.g. pt1210_file_open()
  • Braces (first brace dropped-down vs first brace in-line)
    • Currently dropping down to a new line for the first brace to help clarify where blocks start/end
  • Ensuring trailing whitespace is never present
    • Editors can be configured to auto-strip trailing whitespace

We can also employ tools such as clang-tidy to automatically detect when we stray from these and automatically fix them.

Editorconfig a nice tool which is built into many editors or available as an extension which reads an .editorconfig file and sets up things like indentation automatically.

accurate BPM option

the BPM of ProTracker is not 100% accurate, need to investigate why this is and if it is possible to make ti 100% accurate. if this can be achieved it can be added to a new config page.

ARexx port

Idea: Detect ARexx on OS2.x and above, and if the user enables this feature, provide an ARexx port to allow users to write scripts to automate PT-1210.

This could be used to interface PT-1210 with some kind of remote control (e.g. serial, network), stream track information/BPM, or other useful things.

It may also be useful for automated testing.

CD32 Control Pad support

I started this and maybe it's close or it to work.
I am using JOTD's CD32 pad code found in the JST source here: http://jotd.pagesperso-orange.fr/amiga.html

I included his code and I am just unable to wire it to the rest of the program. Hoffman will have to look at my version of the code when I send it to him.

I already devised a preliminary control scheme fr CD32 pad control. It involves shift keying:

L+R = shift keys
Pad Left: Nudge -
Pad Right: Nudge +
Pad Up: BPM +
Pad Down: BPM -
R+Pad Left: Nudge Hard -
R+Pad Right: Nudge Hard +
R+Pad Up: Pattern Fwd
R+Pad Down: Pattern Rwd
Red button: Loop FX on/off
Blue button: loop length cycle
Green button: slip mode
Yellow button: Set Loop In/Out/Off
L+Yellow button: Repitch on/off
Start button: Play/Pause
L+Start button: Cue
R+Start button: Set Cue

Of course this will need intensive testing and redoing.

I have a controller board to create a CD32 pad. I could even turn this into a bespoke controller!

Comment the original source

It would be great if the original ASM source gets more comments.
I added what I discovered to my copy of the code, but I was mostly travelling blindly through it.

I promise to send Ian this code today so he can compare/merge.

Palette customization

It’d be neat to have each computer on a different colour, changing just some of the colours, like digits display colours and playhead colour.

Screensaver

Provide a configurable screensaver that can blank the screen after x seconds to prevent screen burn-in or prevent distractions.

"Real" muting

I thought we had an issue here for this, as we discussed it, if we do, please close this one.

Have the mutes shut audio off immediately instead of not letting further samples play while muted. I guess this would also be tied to my "gater fx" request.

"Played" indicator

Add a feature to the file browser to show which songs have already have been played in this session, a bit like Traktor.

This could be as simple as a small icon next to played songs.

The indicators should survive when the user navigates up and down the file system hierarchy.

Idea for implementation:

  • Implement a fast hashing function (e.g. Pearson hashing) that can scan a module header and create a unique hash code based on its file name, file size, song title, and sample names (n.b. whole module header).
  • For every song that has been played for more than $SOME_AMOUNT_OF patterns, add its hash into a global in-memory "played" list. This could be a fixed length, or dynamically-growing.
  • When refreshing the file browser, hash each song being scanned. If the resulting hash code is in the "played" list, draw its "played" icon in the file browser.

Track solo'ing and un-mute all

We could do this by shift-pressing the already present channel mutes. Shift-1 will solo 1, etc.
Maybe another shortcut to un-mute all muted channels at once.

Cue marker doesn't show up when set again

On load, the cue marker (red bit on the sequence band at the beginning) shows up, but after you set it anywhere else, it doesn't show up anymore. Everything works, it's just the visual aid disappeared.

New readme.txt

Take all the text I already made for the PDF manual. revise it to match current features, and add it as TXT file.

random crashes and debug version

these have happened in the wild but have not been able to be captured or reproduced as yet. need to consider how to build a hardy debug version which we can push out for testing which will capture the exceptions and give us some idea of what is going on.

move project to C

convert the majority of code to C enabling easily development of all the new features we want to put in. in the process we need to start stripping out all the nasty system killy stuff.

Pitch lock

Make the currently active frequency table locked and turn off repitch at that point (for harmonic mixing)

Screen initialization issues on the ASM source

When you boot straight to PT-1210 and you remove the splash screen (like I had or test purposes), in OS2.x+, the program will not initialize the screen properly because the display initialization code seems to be in the display code of the splash screen.

This never happens on OS 1.x because it will always open a shell screen when booting off a startup-sequence. "Fix"was for me to output to shell so it would open the screen before booting the program (with like an echo comand).

This will probably get squashed with the refactoring but I thought I'd mention it in case anyone lands on it.

Configuration file

Allow the user to configure PT-1210 with an .INI-format configuration file that's human-readable and easy to edit with standard Amiga or PC text editors.

Idea: could these options be mirrored in icon ToolTypes, too? Perhaps ToolTypes would take priority, followed by config file, followed by default values.

Initial list of options to implement (checked = implemented):

general

  • splash: Enable splash screen on startup (on/off, default: on)
  • close_wb: Attempt to close Workbench when PT-1210 starts (on/off, default: off)

dir_cache

  • mode: Set directory caching mode: 0 = disabled, 1 = auto, 2 = manual (0/1/2, default: 1)
  • whitelist: Comma-separated list of paths to include when caching (manual mode only) (default: empty)
  • blacklist: Comma-separated list of paths to exclude when caching (manual and automatic modes) (default: Ram Disk:*)

player

  • soft_nudge_bpm: BPM to add/subtract when using the 'soft' nudge function (default: 1)
  • hard_nudge_bpm: BPM to add/subtract when using the 'hard' nudge function (default: 6)

keyboard

  • repeat_delay: Amount of time, in milliseconds, that a key must be held before it repeats (default: 500)
  • repeat_rate: Period, in milliseconds, at which a held key repeats (default: 1000)

gameport

  • port_0_mode: Mouse port mode: 0 = disabled, 1 = auto detect, 2 = force joystick, 3 = force CD32 pad. (0/1/2/3, default: 0)
  • port_1_mode: Joystick port mode: 0 = disabled, 1 = auto detect, 2 = force joystick, 3 = force CD32 pad. (0/1/2/3, default: 1)

bindings

  • A list of keyboard/joystick action bindings in some reasonable format.
    Example: LEFT_SHIFT + UP = pitch_up_fine
    This section should contain the entire default binding list, maybe commented out so the user can easily tweak as they please. PT-1210 will contain the default bindings internally in case that a config file is not found. If this section contains at least one valid binding, the internal defaults should be ignored, and it's then on the user to map all the keys they want in this file.

New line loop code

New line loop code to monitor sample positions, means looped drum samples will re-trigger when looped half way through.

PDF manual

I have this 90% written, just need formatting and graphics.

formalise frames per beat function in UI

we have a function where you can write !FRMxx in sample name 31 to set the number of frames per best. this has to be done manually at the moment in protracker. would be great if within pt-1210 you could pull up a mod config page and set this inside the software and ultimately save that config inside the module.

Screen swapping/dragging

We now open the PT-1210 screen in a semi-system-friendly fashion by bringing up an Intuition screen, but then hijacking its copperlists every VBlank.

By rewriting the copper lists to be system-friendly, the ability to flip between PT-1210 and Workbench will "just work", and the screen can be pulled down to reveal Workbench for true friendly multitasking.

Program crash on module load

I cannot consistently reproduce this one but I can 100% have it happen every time I have a session :/
Sometimes module loading crashes the software with a guru. It must be some kind of memory allocation issue?

Load pattern data to fast ram if available

Currently we load the entire mod into chip ram which isn't great if the user has a stack of fast ram.

would require..

  1. load initial header - discover how many patterns there are
  2. load pattern data
  3. load remaining data into chip
  4. modify PT player init to take all three pointers.

fix loading from floppy disk on kickstart 1.2 / 1.3

loading from floppy on kickstart 1.2 / 1.3 does not work once the system is up and running. before the system is taken down however, it does work fine (loads the list of modules on start-up).

suspect this is because kickstart 1.2 / 1.3 use the blitter to decode the MFM floppy disk buffer but we are hammering the blitter in an unfriendly way, don't think we even own or disown the blitter from the OS.

once all interrupts are system friendly and the UI is being updated in a friendly manner, then this "should" resolve itself.

NTSC?? do we care

would be nice.. but also need to fix the scopes and some other stuff as they are hardwired to 50hz.

"About" screen

I liked the idea of an "About" screen/page, could we still do it but text only? That way it would not take much RAM:

about-mockup

Tune name sent through serial port

I just had a crazy super low priority idea, hear me out.

I heard it's pretty easy to control an I2C LED display using the serial port.
Could we have it display the tune title we're playing or something?

It would work great for a headless design, with a little LCD showing some info, or even connecting it to a "ticker"-like large LCD that shows the damn tune I am playing, so people on YouTube stop asking me for a tracklist :P

I guess even just sending the data through serial as a string could be handy if you hook it to a PC and make a script that inserts it into OBS or whatever...

Anyway SUPER low priority this!

Workbench 2.x+ AppIcon

Idea: Under WB 2.x+, enable an AppIcon on the Workbench.

This could be used for say, if the user wants to use Workbench or some other graphical file management to locate their modules. Modules could then be dragged-and-dropped onto the PT-1210 icon to load them into the deck.

This feature would require #45 to be completed first.

EFx carried over to newly loaded module in some occasions

Reported by Pekka Korolainen:

"If I play a tune with an EFx, x != 0; and load another mod and there was no EF0 in the previous mod, the EFx carries over (although EFx is the most awesomest effect, this sounds pretty bad sometimes)."

sample pointer tracking

add function to keep track of the sample pointers on each line as the track plays, then when line looping is activated, it can re-trigger drum loops at the correct point if no note exists on that line.

note: work out formula to take into account period and bpm to determine how far we've moved since last frame. similar to the the way the scopes work.

module config

config options for a module

  • frames per beat ( default is 24 )
  • bpm ( detected and stored but can be edited )
  • track name edit
  • artist name edit ( detect by finding first sample name with # )
  • cue points ( yes I know they don't exist yet )

all the info we'll store in the sample names so writing the data back to the module should means only writing the header (should be dead quick). need to decide on a flag in the header which denotes all data should exist because it's been saved by PT-1210

side note, possibly option to knock up super quick C# app for doing this function in windows.

folder and device support

Currently PT-1210 only scans the current folder and displays only modules within that folder. Needs a proper file / folder browser including listing drives

"Vinyl stop"

i.e. a quick stop, not immediate audio cut off, say 1 second to slow BPM to zero and stop track

CD32 CD-ROM reading not working properly

Very small dirs work OK but longer ones get stuck in "reading directory".
Sometimes after a while waiting like that, screen gets corrupted, some "software failure" requester can be made out, and then Amiga reboots with guru.

Test iso provided in another issue.

Gater FX

Cuts audio at a predetermined rate i.e. every other line to get a cross fader/stutter type effect.
Should be maybe another mode of the line looper? Mute volume every X step?

graphics engine refactor and theme setup

create brand new UI data format so graphics engine does not work from hard blits and multiple incbins. instead create a theme template and graphic tool to allow for inclusion of any theme.

currently the graphics are split into lots of tiny files and the blit functions in asm expect them to be in a particular place and a partiuclar size. also there are a lot of copper tricks on the HUD to try and save memory which we probably don't need. removing these will un-complicate the screen setup we have and also allow for easy palette configs to be loaded or even included with the theme.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.