una utilidad de línea de comando de archivo de secuencia AKAI MPC 1000
A menudo uso mi MPC 1000 como reproductor para pistas de acompañamiento o loops de batería cuando practico música o simplemente quiero tocar algo rápidamente. Normalmente creo un loop de batería en mi DAW de elección y luego exporto varios archivos wav a diferentes velocidades. Luego copiaría esos archivos en mi MPC y guardaría una secuencia para cada archivo wav. La próxima vez que quiera practicar o improvisar, sólo tengo que cargar rápidamente una carpeta de secuencias y archivos wav y puedo cambiar fácilmente entre varias velocidades.
Crear todas las secuencias en el MPC es una tarea muy tediosa, por eso escribí esta herramienta. Ahora sólo tengo que crear una "secuencia de plantilla" en el MPC, copiarla a la computadora y crear varios archivos (renombrados) a partir de ella. Luego dejo que la herramienta me ayude a mostrar metainformación de los archivos de secuencia y realizar tareas repetitivas como reemplazar el nombre del archivo en las pistas de AUDIO o reemplazar los BPM de las secuencias.
Aunque lo escribí para archivos de secuencia creados a partir del MPC 1000 ejecutando JJOS, supongo que la herramienta también funcionaría con los archivos del MPC 2500, creo que comparten el mismo formato. Quizás también funcione el del MPC 500, no estoy seguro de eso. Ciertamente agradecería cualquier prueba y comentario sobre el uso de esos archivos de modelos MPC.
Si no quiere molestarse en instalar Python en su sistema operativo y no está interesado en ejecutar la última versión de desarrollo, simplemente use los ejecutables independientes disponibles desde la versión v1.2: https://github.com/JOJ0/ mpc1k-seq/releases/tag/v1.2
seq.exe
seq
(no estoy seguro si las versiones más recientes de MacOS funcionarán, informe cualquier problema) Para poder ejecutar seq
desde cualquier lugar de su sistema, cópielo a un lugar que se busque:
Utilice el Explorador de Windows para copiar el archivo seq.exe en c:windowssystem32
Tenga en cuenta que este es un truco sucio. Si no desea hacer esto o no tiene los privilegios para hacerlo, en el símbolo del sistema siempre puede simplemente "cd" al lugar donde está guardado seq.exe y ejecutarlo desde allí :-)
Asegúrese de residir dentro del directorio donde se guarda seq. Su usuario debe tener privilegios de administrador. Se le pedirá su contraseña al ejecutar el siguiente comando:
sudo cp seq /usr/local/bin/
¡Simplemente siga los pasos del siguiente capítulo!
omita este capítulo si está utilizando los ejecutables como se describe arriba
En primer lugar, verifique si ya tiene una versión de Python en su sistema con python --version
Necesitas Python 2.7.x
Clona el repositorio de github y accede al directorio.
git clone https://github.com/JOJ0/mpc1k-seq.git
cd mpc1k-seq
Descargue un instalador msi aquí
instale la herramienta agregando el directorio de repositorio clonado a la variable %path% del sistema,
o simplemente cópielo rápido y sucio a una ruta que ya esté en la ruta de búsqueda del sistema
copy seq.py c:windowssystem32
Mac OS X 10.11 "El Capitan" viene con Python 2.7.6 preinstalado, que es la versión en la que se desarrolló y prueba la utilidad. OX X 10.8 tenía Python 2.6, que probablemente también funcionaría. 10.9 y posteriores tienen 2.7.x, lo que debería estar bien.
Si no tiene el anterior, instale el último paquete 2.7 desde aquí o use homebrew para obtenerlo.
instalar la herramienta
cp seq.py /usr/local/bin/
¡Lo más probable es que ya tengas una versión de Python en ejecución! ¡Compruebe como se describe arriba!
Algunas distribuciones modernas de Linux ya usan Python 3.x de forma predeterminada, tendría que instalar un paquete python2
Sistemas basados en Debian
apt install python2.7
Basado en sombrero rojo
yum install python27
y configure la primera línea del script para usar esta versión de Python (por ejemplo, #!/usr/bin/python2.7
)
finalmente, instale la herramienta
cp seq.py /usr/local/bin/
En caso de que esté utilizando la versión de desarrollo, deberá ejecutar seq.py en lugar de seq. Tenga en cuenta además que Windows seq.exe se puede ejecutar sin que finalice .exe. El ejecutable de MacOS se llama simplemente seq y no tiene final de archivo.
La utilidad viene como una utilidad de línea de comando estilo UNIX y como tal muestra todas sus capacidades cuando se ejecuta con las opciones típicas --help o -h:
seq -h
usage: seq [-h] [--search SEARCHTERM] [--replace REPLACETERM]
[--correct-wav] [--correct-wav-bpm] [--filter BPM_LIST]
[--correct-bpm] [--hex] [--verbose]
path
positional arguments:
path path of *.SEQ files to be processed
optional arguments:
-h, --help show this help message and exit
--search SEARCHTERM, -s SEARCHTERM
search for given string in file contents
--replace REPLACETERM, -r REPLACETERM
replace SEARCHTERM with REPLACETERM
--correct-wav, -w sets basename of .SEQ file to the place where
SEARCHTERM is found. Use this if your seq and wav
files are named identically
--correct-wav-bpm, -p
replace BPM in found SEARCHTERM with BPM found in
filename
--filter BPM_LIST, --bpm BPM_LIST, -b BPM_LIST
historically was used as a space seperated BPM list
but actually it is a simple filter: only filenames
containing one of the strings in the list, will be
processed
--correct-bpm, -c set BPM to the same as in filename
--correct-length, -l set the sequences looplength (bars) to the same as in
filename. Assumes value in filename is marked with
trailing "b" (eg 8b)
--hex, -x show hex values next to decimal and strings
--verbose, -v also show border markers and not yet studied header
information
simplemente muestre metainformación de todos los archivos secuenciales en el directorio actual
seq .
muestra información de todos los archivos secuenciales que tienen 64 o 512 en el nombre del archivo (generalmente valores BPM)
seq -b "64 512" .
también muestra valores en hexadecimal
seq -b "64 512" -x .
buscar una cadena
seq -b "64 512" -x -s "FunkBG" .
reemplace la primera aparición de SEARCHTERM con REPLACETERM (ejecute el script nuevamente para reemplazar la siguiente instancia de SEARCHTERM)
FIXME: "replacecount" puede configurarse en versiones futuras
seq -b "64 512" -x -s "FunkBG" -r "Blues01" .
Muestra todos los archivos .SEQ en el directorio actual ( .
) que tienen 80 en el nombre del archivo ( -b "80"
o --filter "80"
y busca el término "FunkBG"
en el archivo
Generalmente esto es útil si queremos buscar y reemplazar el nombre de un archivo WAV en una pista de audio, pero probablemente también podríamos usarlo para reemplazar el nombre de un "archivo de programa" MPC (.PGM) en algún lugar de la secuencia (binaria). archivo.
Echemos un vistazo a la línea de comando y su resultado:
seq -b "80" -s FunkBG .
* PATH used: .
* searching for "FunkBG" (after End of header)
* bpm_list (filter_list): ['80']
############### FunkBG_080_8bar.SEQ ################
4:20 version: MPC1000 SEQ 4.40
28:30 bars: 8
32:34 bpm: 80
################## End of header ###################
Found first occurence of SEARCHTERM at index 7168, it's 6 chars long
If SEARCHTERM is the START of a wav filename in an AUDIO track,
this would be the first half: "FunkBG_0"
and this would be the second half: "80_8bar"
** REPLACE OPTIONS: ********************************
** --replace simply replaces FunkBG with REPLACETERM.
** --correct-wav (-w) puts this files basename at found terms position,
** it would replace "FunkBG_0" with "FunkBG_0",
** and "80_8bar" with "80_8bar".
** --correct-wav-bpm (-p) just replaces the bpm part in the found term,
?? didn't find a possible bpm value in given term (FunkBG),
?? use underscores or dashes as seperating characters!
** it would replace "FunkBG" with "FunkBG".
** If this all looks like crap, don't do it! Existing files will be OVERWRITTEN!
La primera sección del resultado nos muestra metainformación guardada en el encabezado de los archivos, como la versión, el número de compases y el BPM de la secuencia.
Después del marcador "Fin del encabezado", vemos que se encontró nuestro término de búsqueda "FunkBG" y lo más probable es que sea el comienzo del nombre de un archivo wav en una pista de AUDIO.
Supongamos que nos gustaría reemplazar parte del nombre del archivo wav configurado en el archivo seq. Curiosamente, el nombre de un archivo wav se guarda en dos fragmentos de 8 bytes en diferentes lugares. El script intenta ayudarnos a descubrir si acaba de encontrar parte del nombre de un archivo wav o algo más (como un nombre de archivo pgm o alguna otra cadena).
Las siguientes son nuestras posibilidades para reemplazar esa cadena:
--replace (-r)
es la forma más simple de reemplazo, simplemente coloca REPLACETERM en la posición donde encontró SEARCHTERM. Si REPLACETERM es más largo que SEARCHTERM, sobrescribirá la parte restante.
--correct-wav (-w)
es la opción que se utiliza cuando nuestros archivos wav tienen exactamente el mismo nombre que nuestros archivos wav (excepto el final del archivo, por supuesto). Esta es la opción que más uso. En el caso del archivo seq de ejemplo del repositorio de github, los nombres de los archivos wav y seq ya eran idénticos, por lo que esta opción actualmente no es muy útil.
--correct-wav-bpm (-p)
solo tiene sentido cuando SEARCHTERM contiene números que representan valores de BPM. Lo mostraré en otro ejemplo.
Cada una de las opciones indica exactamente qué reemplazarían, por lo que si estamos satisfechos con una de ellas, simplemente volvemos a ejecutar el script y además agregamos la opción de reemplazo a la línea de comando.
Por ejemplo, si elegimos -r
como opción a usar, porque simplemente queremos reemplazar "FunkBG" con "PunkBG", este sería el comando y su salida resultante:
seq -b "80" -s FunkBG -r "PunkBG" .
* PATH used: .
* searching for "FunkBG" (after End of header)
* replace is enabled! REPLACETERM is "PunkBG"
* bpm_list (filter_list): ['80']
############### FunkBG_080_8bar.SEQ ################
4:20 version: MPC1000 SEQ 4.40
28:30 bars: 8
32:34 bpm: 80
################## End of header ###################
Found first occurence of SEARCHTERM at index 7168, it's 6 chars long
If SEARCHTERM is the START of a wav filename in an AUDIO track,
this would be the first half: "FunkBG_0"
and this would be the second half: "80_8bar"
!!! replacing FIRST occurence of "FunkBG" with "PunkBG",
!!! and overwriting ./FunkBG_080_8bar.SEQ ...
Si volvemos a buscar FunkBG, seguro que ya no lo encontraremos:
seq -b "80" -s "FunkBG" .
* PATH used: .
* searching for "FunkBG" (after End of header)
* bpm_list (filter_list): ['80']
############### FunkBG_080_8bar.SEQ ################
4:20 version: MPC1000 SEQ 4.40
28:30 bars: 8
32:34 bpm: 80
################## End of header ###################
your SEARCHTERM "FunkBG" was not found!
En su lugar, se encontraría Punk y tendríamos opciones similares a las de nuestra primera búsqueda anterior:
seq -b "80" -s "Punk" .
* PATH used: .
* searching for "Punk" (after End of header)
* bpm_list (filter_list): ['80']
############### FunkBG_080_8bar.SEQ ################
4:20 version: MPC1000 SEQ 4.40
28:30 bars: 8
32:34 bpm: 80
################## End of header ###################
Found first occurence of SEARCHTERM at index 7168, it's 4 chars long
If SEARCHTERM is the START of a wav filename in an AUDIO track,
this would be the first half: "PunkBG_0"
and this would be the second half: "80_8bar"
** REPLACE OPTIONS: ********************************
** --replace simply replaces Punk with REPLACETERM.
** --correct-wav (-w) puts this files basename at found terms position,
** it would replace "PunkBG_0" with "FunkBG_0",
** and "80_8bar" with "80_8bar".
** --correct-wav-bpm (-p) just replaces the bpm part in the found term,
?? didn't find a possible bpm value in given term (Punk),
?? use underscores or dashes as seperating characters!
** it would replace "Punk" with "Punk".
** If this all looks like crap, don't do it! Existing files will be OVERWRITTEN!
Este es el caso de uso para el que escribí este script. Tomemos el archivo del ejemplo anterior donde reemplazamos Funk con Punk, pero copiemos y cambiemos el nombre. Puedes copiar/cambiar el nombre como quieras, por ejemplo, iOS X Finder tiene incorporada una buena herramienta de cambio de nombre masivo. Lo hago directamente en la línea de comando ahora, mientras estamos en eso:
cp FunkBG_080_8bar.SEQ PunkBG_080_8bar.SEQ
cp FunkBG_080_8bar.SEQ PunkBG_090_8bar.SEQ
cp FunkBG_080_8bar.SEQ PunkBG_100_8bar.SEQ
Bien, ahora nos gustaría configurar el nombre de los archivos wav en los 3 "archivos de secuencia Punk" al mismo nombre que el nombre del archivo. Primero buscamos a Punk y vemos qué tenemos. Probablemente haya otros archivos secuenciales en esta carpeta, por lo que seleccionamos particularmente nuestros 3 archivos con la opción --filter (-b)
:
seq --filter Punk -s "PunkBG" .
* PATH used: .
* searching for "PunkBG" (after End of header)
* bpm_list (filter_list): ['Punk']
############### PunkBG_080_8bar.SEQ ################
4:20 version: MPC1000 SEQ 4.40
28:30 bars: 8
32:34 bpm: 80
################## End of header ###################
Found first occurence of SEARCHTERM at index 7168, it's 6 chars long
If SEARCHTERM is the START of a wav filename in an AUDIO track,
this would be the first half: "PunkBG_0"
and this would be the second half: "80_8bar"
** REPLACE OPTIONS: ********************************
** --replace simply replaces PunkBG with REPLACETERM.
** --correct-wav (-w) puts this files basename at found terms position,
** it would replace "PunkBG_0" with "PunkBG_0",
** and "80_8bar" with "80_8bar".
** --correct-wav-bpm (-p) just replaces the bpm part in the found term,
?? didn't find a possible bpm value in given term (PunkBG),
?? use underscores or dashes as seperating characters!
** it would replace "PunkBG" with "PunkBG".
** If this all looks like crap, don't do it! Existing files will be OVERWRITTEN!
############### PunkBG_090_8bar.SEQ ################
4:20 version: MPC1000 SEQ 4.40
28:30 bars: 8
32:34 bpm: 80
bpm in filename is different! correct with -c
################## End of header ###################
Found first occurence of SEARCHTERM at index 7168, it's 6 chars long
If SEARCHTERM is the START of a wav filename in an AUDIO track,
this would be the first half: "PunkBG_0"
and this would be the second half: "80_8bar"
** REPLACE OPTIONS: ********************************
** --replace simply replaces PunkBG with REPLACETERM.
** --correct-wav (-w) puts this files basename at found terms position,
** it would replace "PunkBG_0" with "PunkBG_0",
** and "80_8bar" with "90_8bar".
** --correct-wav-bpm (-p) just replaces the bpm part in the found term,
?? didn't find a possible bpm value in given term (PunkBG),
?? use underscores or dashes as seperating characters!
** it would replace "PunkBG" with "PunkBG".
** If this all looks like crap, don't do it! Existing files will be OVERWRITTEN!
############### PunkBG_100_8bar.SEQ ################
4:20 version: MPC1000 SEQ 4.40
28:30 bars: 8
32:34 bpm: 80
bpm in filename is different! correct with -c
################## End of header ###################
Found first occurence of SEARCHTERM at index 7168, it's 6 chars long
If SEARCHTERM is the START of a wav filename in an AUDIO track,
this would be the first half: "PunkBG_0"
and this would be the second half: "80_8bar"
** REPLACE OPTIONS: ********************************
** --replace simply replaces PunkBG with REPLACETERM.
** --correct-wav (-w) puts this files basename at found terms position,
** it would replace "PunkBG_0" with "PunkBG_1",
** and "80_8bar" with "00_8bar".
** --correct-wav-bpm (-p) just replaces the bpm part in the found term,
?? didn't find a possible bpm value in given term (PunkBG),
?? use underscores or dashes as seperating characters!
** it would replace "PunkBG" with "PunkBG".
** If this all looks like crap, don't do it! Existing files will be OVERWRITTEN!
Si examinamos de cerca el resultado de los 3 archivos, encontraremos estas posibilidades útiles
--correct-bpm (-c)
podría corregir los BPM de la secuencia en los archivos 2 y 3 (las copias)--correct-wav (-w)
podría reemplazar el nombre del archivo wav de las pistas de AUDIO para que sea igual al nombre de los archivos secuenciales. También en los archivos 2 y 3 (las copias) Si ahora usamos las opciones -w
y -c
, obtendremos el siguiente resultado:
seq --filter Punk -s "PunkBG" -w -c
* PATH used: .
* searching for "PunkBG" (after End of header)
* bpm_list (filter_list): ['Punk']
* correct-bpm is enabled!
* correct-wav is enabled!
############### PunkBG_080_8bar.SEQ ################
4:20 version: MPC1000 SEQ 4.40
28:30 bars: 8
32:34 bpm: 80
################## End of header ###################
Found first occurence of SEARCHTERM at index 7168, it's 6 chars long
If SEARCHTERM is the START of a wav filename in an AUDIO track,
this would be the first half: "PunkBG_0"
and this would be the second half: "80_8bar"
-> found underscore seperated bpm value in given term: 80
!!! putting "PunkBG_0" where "PunkBG_0",
!!! putting "80_8bar" where "80_8bar",
!!! replacing bpm value,
!!! and overwriting ./PunkBG_080_8bar.SEQ ...
############### PunkBG_090_8bar.SEQ ################
4:20 version: MPC1000 SEQ 4.40
28:30 bars: 8
32:34 bpm: 80
bpm in filename is different! This will be fixed now!
################## End of header ###################
Found first occurence of SEARCHTERM at index 7168, it's 6 chars long
If SEARCHTERM is the START of a wav filename in an AUDIO track,
this would be the first half: "PunkBG_0"
and this would be the second half: "80_8bar"
-> found underscore seperated bpm value in given term: 90
!!! putting "PunkBG_0" where "PunkBG_0",
!!! putting "90_8bar" where "80_8bar",
!!! replacing bpm value,
!!! and overwriting ./PunkBG_090_8bar.SEQ ...
############### PunkBG_100_8bar.SEQ ################
4:20 version: MPC1000 SEQ 4.40
28:30 bars: 8
32:34 bpm: 80
bpm in filename is different! This will be fixed now!
################## End of header ###################
Found first occurence of SEARCHTERM at index 7168, it's 6 chars long
If SEARCHTERM is the START of a wav filename in an AUDIO track,
this would be the first half: "PunkBG_0"
and this would be the second half: "80_8bar"
-> found underscore seperated bpm value in given term: 100
!!! putting "PunkBG_1" where "PunkBG_0",
!!! putting "00_8bar" where "80_8bar",
!!! replacing bpm value,
!!! and overwriting ./PunkBG_100_8bar.SEQ ...
Una última comprobación nos muestra que se ha corregido el nombre del archivo wav y también el BPM:
seq --filter Punk -s "PunkBG" .
* PATH used: .
* searching for "PunkBG" (after End of header)
* bpm_list (filter_list): ['Punk']
############### PunkBG_080_8bar.SEQ ################
4:20 version: MPC1000 SEQ 4.40
28:30 bars: 8
32:34 bpm: 80
################## End of header ###################
Found first occurence of SEARCHTERM at index 7168, it's 6 chars long
If SEARCHTERM is the START of a wav filename in an AUDIO track,
this would be the first half: "PunkBG_0"
and this would be the second half: "80_8bar"
** REPLACE OPTIONS: ********************************
** --replace simply replaces PunkBG with REPLACETERM.
** --correct-wav (-w) puts this files basename at found terms position,
** it would replace "PunkBG_0" with "PunkBG_0",
** and "80_8bar" with "80_8bar".
** --correct-wav-bpm (-p) just replaces the bpm part in the found term,
?? didn't find a possible bpm value in given term (PunkBG),
?? use underscores or dashes as seperating characters!
** it would replace "PunkBG" with "PunkBG".
** If this all looks like crap, don't do it! Existing files will be OVERWRITTEN!
############### PunkBG_090_8bar.SEQ ################
4:20 version: MPC1000 SEQ 4.40
28:30 bars: 8
32:34 bpm: 90
################## End of header ###################
Found first occurence of SEARCHTERM at index 7168, it's 6 chars long
If SEARCHTERM is the START of a wav filename in an AUDIO track,
this would be the first half: "PunkBG_0"
and this would be the second half: "90_8bar"
** REPLACE OPTIONS: ********************************
** --replace simply replaces PunkBG with REPLACETERM.
** --correct-wav (-w) puts this files basename at found terms position,
** it would replace "PunkBG_0" with "PunkBG_0",
** and "90_8bar" with "90_8bar".
** --correct-wav-bpm (-p) just replaces the bpm part in the found term,
?? didn't find a possible bpm value in given term (PunkBG),
?? use underscores or dashes as seperating characters!
** it would replace "PunkBG" with "PunkBG".
** If this all looks like crap, don't do it! Existing files will be OVERWRITTEN!
############### PunkBG_100_8bar.SEQ ################
4:20 version: MPC1000 SEQ 4.40
28:30 bars: 8
32:34 bpm: 100
################## End of header ###################
Found first occurence of SEARCHTERM at index 7168, it's 6 chars long
If SEARCHTERM is the START of a wav filename in an AUDIO track,
this would be the first half: "PunkBG_1"
and this would be the second half: "00_8bar"
** REPLACE OPTIONS: ********************************
** --replace simply replaces PunkBG with REPLACETERM.
** --correct-wav (-w) puts this files basename at found terms position,
** it would replace "PunkBG_1" with "PunkBG_1",
** and "00_8bar" with "00_8bar".
** --correct-wav-bpm (-p) just replaces the bpm part in the found term,
?? didn't find a possible bpm value in given term (PunkBG),
?? use underscores or dashes as seperating characters!
** it would replace "PunkBG" with "PunkBG".
** If this all looks like crap, don't do it! Existing files will be OVERWRITTEN!
FIXME... ejemplo de cómo utilizar --correct-wav-bpm