Difference between revisions of "Pcad"

From ProgClub
Jump to: navigation, search
(Just how to Jam on Guitar - Jamming For Beginners)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
How to Jam on Guitar - Jamming For Beginners
+
Pcad is the ProgClub administration daemon software. That's the software that does various administration things when a non-privileged user asks for them to be done. For example, it can recreate some MySQL databases on your behalf. For other projects see [[Projects]].
+
 
Guitar jam sessions are a fine way to improve your playing skills and your confidence because a guitarist. They could additionally be very daunting for guitarists who are brand new to jamming, particularly beginners. But jamming is actually designed to be fun, and is going to be if you realize what to expect, and go organized. This article takes a appear at what'utes involved, starting up with the techniques needed when jamming, followed by the different situations in which you can make use of them.  
+
== Project status ==
+
 
Component 1: Jamming On Guitar - How To Do It
+
Under way. Not released yet, there's stuff [[Pcad#TODO|TODO]].
+
 
Basically, jamming is truly improvising with other musicians - generally one or far more people play rhythm parts, to get a beat going, and others improvise solos over the top. A jam may become entirely free-form, or may be based on a particular song or chord sequence. Nonetheless, though you may not always become preparing to play any particular song or item, you can (and should) prepare yourself by making sure you have a solid understanding of one's instrument. This particular means practicing chords and scales in various keys, so that you'll end up being able to play both rhythm and solo parts while jamming. You don'testosterone should be the expert guitarist to jam, but you carry out need to at least grasp the basic principles.  
+
== Contributors ==
+
 
Skills needed for jamming:  
+
Members who have contributed to this project. Newest on top.
   
+
 
Strumming chords in a variety of keys, with the ability to switch chords cleanly. If you're brand new to the guitar, start off with the main chords in the more common keys (this sort of because C, G, D, A, At the, F and so on), and progress coming from there.  
+
* [[User:SanguineV|SanguineV]]
The ability to play in time. You don't have to play complex rhythms if you're not cozy with that, but you must be able to preserve to the beat. If you're playing a solo, the rhythm must take top priority - in other terms, if you come unglued, it's ok to ignore out a number of notes in the melody, but you must remain upward with the beat. Learn to listen closely to the bass and/or drums - this kind of will help you to definitely stay in the right place, and to keep being distracted by nerves or other things going on around you.  
+
* [[User:John|John]]
The ability to hear chord progressions and follow along. Ear skills are vital for jamming - you can training by recognising when chord changes happen in the music you listen to, and later by understanding to identify the unique chords that are being used. You'll find that the same patterns tend to recur a lot (specifically in popular music), and will eventually be able to recognise them instantly. For much more advanced ear training, specialised classes are available.
+
 
Being able to improvise lead melodies. You might not want to make this happen straight away, which will be good - you can just strum along with the rhythm if you like. But to be able to improvise melodies is truly a key part of a lot more advanced jamming, and requires some lead guitar skills. Scale train is essential below, because is some basic theory, so that you know which notes can be effectively played over which chords.  
+
All contributors have agreed to the terms of the [[ProgClub:Copyrights#ProgClub_projects|Contributor License Agreement]]. This excludes any upstream contributors who tend to have different administrative frameworks.
+
 
Jamming step by step
+
== Copyright ==
+
 
Jamming is actually by its own nature a reasonably unstructured process, but if you're brand-new to it, you don'capital t have to jump in at the heavy conclusion. Instead, you can develop your jamming skills slowly. First of just about all, you need to know which key the music is actually in - for simple pieces, it will define the chords and notes that you simply will have to be able to play (much more complex jams may involve lots of key changes and the use of a lot more obscure chords - try to get experience of jamming with less difficult songs and sequences first!). Having determined the main element, you can decide how you want to engage in the jam, depending on your skill and confidence level. For instance:  
+
Copyright 2011-2012, [[Pcad#Contributors|Contributors]].
   
+
 
Step one - supposing that you just're basing the jam in and around a song you understand or a predetermined chord series, just strum along with a single strum to each beat using simple downstrokes (or if the pace is as well fast - try strumming each and every other beat, or on the first beat of every pub).  
+
== License ==
Step two - strum along, but instead than just using downstrokes, use upstrokes way too to play a lot more complex rhythms that blend with what the others are doing.  
+
 
Step three - create some simple riffs. These might be repeated with the chord changes, or varied somewhat to make things much more interesting.  
+
Licensed under the [[New BSD license]].
Step several - try improvising some solo melodies. You can preserve them very simple at first, sticking with the notes of each and every chord, then get more adventurous as your skills and confidence advancement.
+
 
+
== Source code ==
If you're playing a good electric guitar, you can often experiment with adding negative effects at any stage in the method, if appropriate.
+
 
   
+
The repository can be browsed online:
Component II: Putting It Into Training - 3 Jamming Scenarios
+
 
+
http://www.progclub.org/pcrepo/pcad/
So, now you have a helpful notion of exactly how to jam on guitar, lets have a go through the main situations which you can train your brand-new skills, and just how to make the the majority of them.
+
 
   
+
The code for pcad is publicly available from svn:
1. Jamming With Folks
+
 
+
http://www.progclub.org/svnro/pcrepo/pcad/tags/latest
Jamming in a reside surroundings with other musicians can't always be beat. After practising individually at residence every day time, it is great to get out and connect which include like-minded others. It also provides invaluable experience if you want to play in a band or other live situation - playing with others requires listening, improvisation and rhythm skills beyond these you'll normally use when playing on it's own.
+
 
+
Or privately available for read-write access:
So, what exactly happens at a jam session? It differs, according to the situation. For case in point, at times people meet up to jam over existing songs (or song constructions), or they may follow a chord range advised by a single associate, and tabs or chord charts may or are most likely not used. Occasionally, because with many free-form jams, there'ersus no predetermined structure at just about all, and everyone just improvises based on what they will're hearing. The music may write about various styles (these kinds of while jazz, stone, blues and many others). If you're brand-new to jamming, you'll possibly discover it less complicated at sessions that follow a familiar song or chord progression, with simple structure this kind of when three chord songs or a 12 club blues.
+
 
   
+
  https://www.progclub.org/svn/pcrepo/pcad/trunk/
In a group situation, you may be expected to play a individual role during each and every piece - these kinds of like playing rhythm, or soloing. Make sure you stick to your task, but also stay aware of what the people inside your session are doing. Eye contact could be incredibly vital if you're just about all improvising in a relaxed way (because opposed to following a predetermined structure), because people will put it to use to indication when they will're about to alter chords or rhythms, or finish a solo and so on.  
+
 
+
== Links ==
You might feel nervous when jamming with others for the first time - this is definitely normal, and you shouldn'n worry too much about making mistakes - that they're inevitable. It will help if you're playing with folks who aren'big t too advanced, or are able to include some less difficult songs in the session for the benefit in the significantly less experienced. Most musicians will probably be welcoming to newcomers and will with any luck , remember how it felt to be brand new to jamming - if they're not, come across somewhere else to play! If you don't have musician pals to jam with already, you can often locate neighborhood jam sessions organised by music stores, bars and the like - these will occasionally always be geared towards players of different standards, so look out for beginner jam sessions to start with.  
+
 
   
+
* [http://blog.emptycrate.com/node/219 Making a Linux Daemon]
If you're unable to jam with other musicians in man or woman, or you only want to improve your jamming skills in between session, you can often jam along with recorded tracks, along with with tools being a drum coffee maker.
+
* [http://www.linuxhowtos.org/C_C++/socket.htm Sockets Tutorial]
   
+
* [http://www.paulgriffiths.net/program/c/echoserv.php Simple TCP/IP echo server]
only two. Jamming With Recorded Tracks
+
 
+
== Functional specification ==
Jamming along with recordings will be the next best thing to playing stay. While it doesn'big t have the same component of unpredictability, it offers you the possibility to exercise emphasizing developing your own improvisational skills versus a constant musical backdrop. You can of course play along with recordings of songs by artists you like - this really is a good way to get to understand the songs that are likely to become played at your live sessions way too.  
+
 
+
There are two components to this software, the client, and the server.
You can even use tracks that have been recorded specifically with jamming in mind - there are lots of free guitar jam tracks in many styles available online (even though the high quality does vary a lot), and there's also professionally recorded tracks available for sale at low prices. These often appear in two versions - a single with a guitar solo included, and 'minus 1' versions where the lead track is actually absent, so that you can fill it in yourself.
+
 
+
=== Pcad server ===
3. Jamming With Software package along with other Mastering Helps
+
 
+
The server runs as a daemon process and listens on a TCP/IP port for incoming requests. It parses the requests to find the command. The command must correspond to an executable script in the /etc/pcad/command/ directory. If there is a matching command script then when the server gets a request for that command it runs the corresponding script as root.
Another option is always to practice jamming with a virtual drummer or bassist in the form of the drum equipment or software program equivalent. This is definitely a very excellent way to build up your rhythm skills, which are vital to effective jamming. Computer software that enables you to software your possess drum or basslines, and/or which is pre-programmed with a variety of presets is truly widely available online. Some software program furthermore provides full backing tracks in various keys.
+
 
+
=== Pcad client ===
If you're still brand-new to playing the guitar, you'll discover that practising playing along with others through a great early stage in the mastering process will help you to definitely jam a lot more confidently. Choosing a course of high quality guitar instruction that comes with jam tracks that gives you experience of playing with a virtual band right through the start will be one particular in the best things you can do - I recommend Jamorama, a downloadable course which features professionally recorded jam track in a variety of styles, right through the first lessons. Come across out much more about it at http://learntheguitaronline.info. You can furthermore read far more about my experience with the Jamorama guitar demonstrations at my site.
+
 
+
The client is a Linux command that accepts a host, port and command. In the future maybe we'll also support command arguments, but that's not a goal for the first version. So the client might accept a command like this:
http://linksmultiply.com/search.php?search=http://www.tremille.com/id/19-jam
+
 
 +
$ pcad-request localhost 12345 recreate-test-database
 +
 
 +
This would send the 'recreate-test-database' command to the pcad server running on the localhost. The server would then receive this command and process the script /etc/pcad/command/recreate-test-database. The pcad-request command blocks until the server has finished processing the request and returns an error level indicating success or error.
 +
 
 +
There will be another client command, pcad-async, which works the same way as pcad-request except that pcad-async does not block until completion of the command, rather it returns immediately after registering a command with the server, and the server will process the command in the background. The pcad-async command returns an error level indicating an error if the command is invalid, if the command is valid and accepted by the server then the error level is zero.
 +
 
 +
=== Thoughts ===
 +
 
 +
Maybe it would be better to give a host name to the client and then have the client lookup the host and port in a config file. For instance there might be a config file in /etc/pcad/client that looks like this:
 +
 
 +
  localhost: localhost 12345
 +
 
 +
The client could then accept commands for localhost and lookup the host name in the config file to determine which server to connect to. This would simplify client code that needed to be reconfigured to use a different port.
 +
 
 +
== Technical specification ==
 +
 
 +
The pcad client commands and the server will be implemented in C.
 +
 
 +
=== Pcad persistent daemon ===
 +
 
 +
The pcad server will run as a persistent daemon with something like the following in /etc/inittab
 +
 
 +
  ad:12345:respawn:/usr/local/sbin/pcad-server
 +
 
 +
To force a reload of the inittab file by the init process:
 +
 
 +
  # kill -HUP 1
 +
 
 +
=== Pcad network protocol ===
 +
 
 +
==== Request ====
 +
 
 +
A request is simply a line of text containing the execution type, followed by a space, followed by the name of the command. The supported execution types are "sync" and "async". So a stream that invoked the recreate-test-database command synchronously would use a network request that looked like this:
 +
 
 +
sync recreate-test-database
 +
 
 +
Or if it was an async request:
 +
 
 +
  async recreate-test-database
 +
 
 +
==== Response ====
 +
 
 +
A response is a line of text containing the error level, e.g. 0 or 1. After the error level is any text returned on the standard output or standard error streams when the command was run. In the case of an async request the output can be either an error message or nothing.
 +
 
 +
==== Thoughts ====
 +
 
 +
There might be a problem with the network connection timing out for long running requests. If the network connection times out the client should return an error level indicating failure. It might be nice to have the server fire up a thread that outputs "." characters every second while the command is being processed. If we do that then the response protocol will have a line of zero or more dots, followed by a line indicating the error level, followed by any output.
 +
 
 +
=== Security ===
 +
 
 +
It might be best to run the pcad-server as a user 'pcad' rather than 'root'. This can be done using sudo in the inittab, e.g.
 +
 
 +
  ad:12345:respawn:/usr/bin/sudo -u pcad /usr/local/sbin/pcad-server
 +
 
 +
The pcad-server would then need to have permission to launch its command scripts as root. This can be accomplished by running the visudo command and adding a line such as the following:
 +
 
 +
  pcad localhost=/etc/pcad/command/*
 +
 
 +
If we do it this way the server will need to support executing scripts with sudo. We'd also need to make sure that the pcad user didn't have write access to the /etc/pcad/command/ directory.
 +
 
 +
== TODO ==
 +
 
 +
Things to do, in rough order of priority:
 +
 
 +
* Make the executable code run forever
 +
* Make the executable a managed daemon process that gets started and stopped properly
 +
* Add support from recreating pcphpjs-dev database
 +
 
 +
== Done ==
 +
 
 +
Stuff that's done. Latest stuff on top.
 +
 
 +
* [[User:John|JE]] 2011-09-09: created project page
 +
* [[User:John|JE]] 2011-09-09: created project in svn
 +
 
 +
== Notes for implementers ==
 +
 
 +
If you are interested in incorporating the ProgClub pcad into your project, here's what you need to know:
 +
 
 +
Just copy and paste your way to victory for this one, I think. You might like to review the code before you use it, I haven't done much programming in C so there might be nasty buffer overflows or other bugs present.

Latest revision as of 15:15, 11 December 2017

Pcad is the ProgClub administration daemon software. That's the software that does various administration things when a non-privileged user asks for them to be done. For example, it can recreate some MySQL databases on your behalf. For other projects see Projects.

Project status

Under way. Not released yet, there's stuff TODO.

Contributors

Members who have contributed to this project. Newest on top.

All contributors have agreed to the terms of the Contributor License Agreement. This excludes any upstream contributors who tend to have different administrative frameworks.

Copyright

Copyright 2011-2012, Contributors.

License

Licensed under the New BSD license.

Source code

The repository can be browsed online:

http://www.progclub.org/pcrepo/pcad/

The code for pcad is publicly available from svn:

http://www.progclub.org/svnro/pcrepo/pcad/tags/latest

Or privately available for read-write access:

https://www.progclub.org/svn/pcrepo/pcad/trunk/

Links

Functional specification

There are two components to this software, the client, and the server.

Pcad server

The server runs as a daemon process and listens on a TCP/IP port for incoming requests. It parses the requests to find the command. The command must correspond to an executable script in the /etc/pcad/command/ directory. If there is a matching command script then when the server gets a request for that command it runs the corresponding script as root.

Pcad client

The client is a Linux command that accepts a host, port and command. In the future maybe we'll also support command arguments, but that's not a goal for the first version. So the client might accept a command like this:

$ pcad-request localhost 12345 recreate-test-database

This would send the 'recreate-test-database' command to the pcad server running on the localhost. The server would then receive this command and process the script /etc/pcad/command/recreate-test-database. The pcad-request command blocks until the server has finished processing the request and returns an error level indicating success or error.

There will be another client command, pcad-async, which works the same way as pcad-request except that pcad-async does not block until completion of the command, rather it returns immediately after registering a command with the server, and the server will process the command in the background. The pcad-async command returns an error level indicating an error if the command is invalid, if the command is valid and accepted by the server then the error level is zero.

Thoughts

Maybe it would be better to give a host name to the client and then have the client lookup the host and port in a config file. For instance there might be a config file in /etc/pcad/client that looks like this:

localhost: localhost 12345

The client could then accept commands for localhost and lookup the host name in the config file to determine which server to connect to. This would simplify client code that needed to be reconfigured to use a different port.

Technical specification

The pcad client commands and the server will be implemented in C.

Pcad persistent daemon

The pcad server will run as a persistent daemon with something like the following in /etc/inittab

ad:12345:respawn:/usr/local/sbin/pcad-server

To force a reload of the inittab file by the init process:

# kill -HUP 1

Pcad network protocol

Request

A request is simply a line of text containing the execution type, followed by a space, followed by the name of the command. The supported execution types are "sync" and "async". So a stream that invoked the recreate-test-database command synchronously would use a network request that looked like this:

sync recreate-test-database

Or if it was an async request:

async recreate-test-database

Response

A response is a line of text containing the error level, e.g. 0 or 1. After the error level is any text returned on the standard output or standard error streams when the command was run. In the case of an async request the output can be either an error message or nothing.

Thoughts

There might be a problem with the network connection timing out for long running requests. If the network connection times out the client should return an error level indicating failure. It might be nice to have the server fire up a thread that outputs "." characters every second while the command is being processed. If we do that then the response protocol will have a line of zero or more dots, followed by a line indicating the error level, followed by any output.

Security

It might be best to run the pcad-server as a user 'pcad' rather than 'root'. This can be done using sudo in the inittab, e.g.

ad:12345:respawn:/usr/bin/sudo -u pcad /usr/local/sbin/pcad-server

The pcad-server would then need to have permission to launch its command scripts as root. This can be accomplished by running the visudo command and adding a line such as the following:

pcad localhost=/etc/pcad/command/*

If we do it this way the server will need to support executing scripts with sudo. We'd also need to make sure that the pcad user didn't have write access to the /etc/pcad/command/ directory.

TODO

Things to do, in rough order of priority:

  • Make the executable code run forever
  • Make the executable a managed daemon process that gets started and stopped properly
  • Add support from recreating pcphpjs-dev database

Done

Stuff that's done. Latest stuff on top.

  • JE 2011-09-09: created project page
  • JE 2011-09-09: created project in svn

Notes for implementers

If you are interested in incorporating the ProgClub pcad into your project, here's what you need to know:

Just copy and paste your way to victory for this one, I think. You might like to review the code before you use it, I haven't done much programming in C so there might be nasty buffer overflows or other bugs present.